[Bug] SessionStart hook receives parent session ID in forked sessions
Resolved 💬 3 comments Opened Dec 27, 2025 by janbam Closed Feb 14, 2026
Bug Description
Bug Report: SessionStart Hook Receives Stale Session ID in Forked Sessions
Summary: When forking a session, the SessionStart hook receives the parent session's ID instead of the newly created session's ID.
Steps to Reproduce:
- Start a Claude Code session (Session A)
- Fork the session (creating Session B)
- Observe the session ID passed to the SessionStart hook
Expected Behavior:
SessionStart hook receives the new session's ID (Session B)
Actual Behavior:
SessionStart hook receives the parent session's ID (Session A)
Evidence:
- /status reports actual session ID: a4abdd71-edbd-46df-80d3-3d1000a7a2d6
- SessionStart hook received: b588daa2-c3b2-459a-a972-6d32ac29cb18 (parent session)
Impact:
Any hook logic that depends on the session ID (logging, state management, file operations keyed by session) will operate on incorrect data in forked sessions.
Environment Info
- Platform: linux
- Terminal: kitty
- Version: 2.0.76
- Feedback ID: c13f0d4c-9fb5-4c2d-8027-cff8b6963505
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗