Skip to content

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

Closed

Description

@acidtech

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

Activity

  1. github-actions commented on Sep 19, 2025

    @github-actions

    Found 2 possible duplicate issues:

    1. [Bug] Incomplete Session ID Update in Resumed Session Metadata #6913
    2. [BUG] Stop hook sends the wrong transcript_path #3019

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. changed the title [-][BUG][/-] [+][BUG] Session ID has unexpected values for SessionStart:resume hooks[/+] on Sep 19, 2025
  3. self-assigned this
    on Sep 19, 2025
  4. acidtech commented on Sep 20, 2025

    @acidtech
    Author

    The referenced reports are not the same problem. in 119 Sessionstart gets a COMPLETELY NEW AND UNIQUE SessionID that is NEVER USED ANYWHERE ELSE. No Jsonl file is created from it. This is not the previous sessions session id. This is effectively a randomly generated UUID that is never used in previous or new sessions EVER.

  5. acidtech commented on Sep 25, 2025

    @acidtech
    Author

    3 new releases since reporting this bug. Still not fixed? It can't be THAT hard to fix this. Come on guys.

  6. acidtech commented on Sep 26, 2025

    @acidtech
    Author

    Another day another release. AND THIS IS STILL NOT FIXED.

  7. cseickel commented on Oct 13, 2025

    @cseickel

    I track sessions in a database and I also track resume chains and I can confirm I just started noticing a problem recently, maybe with the 2.x series.

    I did some testing and realized that this only happens to me when I resume from within another session using the slash command. It works as expected when I resume from the cli args with claude --resume.

    I can't say for sure if it has always been a problem or not, I used to always resume with the flag and for some reason I recently started using the slash command on occasion. It is possible that it was always broken and my behavior has just changed. I can't say for sure either way.

    I never use "continue" so I can't comment on that.

  8. dicksontsai commented on Oct 27, 2025

    @dicksontsai
    Collaborator

    Should be fixed in the next version release. I'll close this issue after it comes out.

  9. github-actions commented on Nov 9, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  10. locked as resolved and limited conversation to collaborators on Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:corebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions