[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

  1. Create a "Stop" hook
  2. Perform any claude prompt
  3. Log the transcript_path that gets sent to the hook script
  4. Clear the current session in Claude Code using /clear
  5. 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.

View original on GitHub ↗

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