Skip to content

[BUG] Stop hook sends the wrong transcript_path #3019

Closed

Description

@mpociot

Environment

  • Platform (select one):
    • 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.

Activity

  1. self-assigned this
    on Jul 5, 2025
  2. dicksontsai commented on Jul 8, 2025

    @dicksontsai
    Collaborator

    Stop hooks have unearthed a long-standing bug with /clear transcript writing. This should be fixed in the next release 1.0.45.

  3. github-actions commented on Aug 11, 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.

  4. locked as resolved and limited conversation to collaborators on Aug 11, 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:macosIssue specifically occurs on macOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions