mirror of
https://github.com/OthmanAdi/planning-with-files.git
synced 2026-04-26 08:26:01 +03:00
[GH-ISSUE #24] SessionStart hook does not work with Skill #17
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/planning-with-files#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tianyili-roller on GitHub (Jan 13, 2026).
Original GitHub issue: https://github.com/OthmanAdi/planning-with-files/issues/24
Context
According to official doc,
the supported events are PreToolUse, PostToolUse, and Stop.
The issue
Although the hooks section contains
SessionStart, it won't work with skills.@OthmanAdi commented on GitHub (Jan 17, 2026):
Hi there,
Thanks for reporting this, and apologies for my delayed response!
Why SessionStart Doesn't Work in Skills
You've discovered an important limitation of Claude Code's skill system. Let me explain what's happening:
The Technical Issue
Skills use component-scoped hooks, which means hooks in SKILL.md only fire when that specific skill is actively loaded and executing.
SessionStart fires when Claude Code starts, but at that moment, skills aren't loaded yet! Claude Code uses "progressive disclosure" - skills only load on-demand when needed.
Result: SessionStart hooks in SKILL.md never fire because there's a timing mismatch.
This is By Design
From the official Claude Code hooks documentation:
✅ Solutions That Actually Work
Option 1: Plugin-Level Hook (Best Solution)
Move the SessionStart hook from SKILL.md to plugin-level configuration.
Create
.claude-plugin/hooks.json:Update
.claude-plugin/plugin.jsonto reference it:Option 2: User-Level Hook
Users can add this to their personal
~/.claude/hooks.json:Option 3: Remove It (Current Approach)
Simply remove SessionStart from SKILL.md since it doesn't work. Focus on:
/planning-with-filesWhat I'm Considering for v2.3.0
I may add plugin-level SessionStart hook in the next release. This would:
Documentation Update
I'll update the README to clarify:
/planning-with-files) is the reliable approachBottom line: This isn't a bug - it's a limitation of how Claude Code's progressive loading works with component-scoped hooks. SessionStart needs to be at plugin-level or user-level, not skill-level.
Thanks for helping identify this! It'll improve the documentation for everyone.
Best regards,
Ahmad
@OthmanAdi commented on GitHub (Jan 20, 2026):
any updates? @tianyili-roller