[BUG] Stop hook sends the wrong transcript_path
Resolved 💬 2 comments Opened Jul 5, 2025 by mpociot Closed Jul 14, 2025
Environment
- Platform (select one):
- [X] Anthropic API
- Claude CLI version: 1.0.41
- Operating System: macOS 15.5
- Terminal: iTerm2
Bug Description
The "Stop" hook does not correctly update the transcript_path when the current session gets cleared using the /clear command
Steps to Reproduce
- Create a "Stop" hook
- Perform any
claudeprompt - Log the
transcript_paththat gets sent to the hook script - Clear the current session in Claude Code using
/clear - Perform another prompt
Expected Behavior
The transcript_path points to a valid file that exists on the filesystem.
Actual Behavior
The transcript_path points to a non-existing file as the original session-id is still being used for writing to the transcript file.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗