[BUG] Session ID has unexpected values for SessionStart:resume hooks

Resolved 💬 7 comments Opened Sep 19, 2025 by acidtech Closed Oct 31, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Session ID and transcript path provided via JSON in Session Start when source = resume is wrong/random. Making it impossible to check the jsonl file at that time. This was NOT an issue a few days ago.

What Should Happen?

Sessionstart hooks should get the correct session id. All other hooks (including statusline hooks) get the correct session id.

Error Messages/Logs

Steps to Reproduce

Setup a hook that prints the session ID on session start. Then test different startups. Cold start, resume(or --continue), clear. The bug is obvious when you actually NEED the session id information.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

I dont know. The most recent previous version I would guess.

Claude Code Version

1.0.119

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗