[Feature Request] Make transcript path more globally available to bash commands
Status Closed — not planned
Maintainer reply None cached
Activity 7 comments · opened Aug 11, 2025 · closed Feb 5, 2026
Driving use case here is that slash commands would be more useful if downstream commands they executed could more easily learn about the session they were called from. This is easily done with hooks since they receive transcript_path, but slash commands have nothing similar, resulting in the need for an awkward hack like this:
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "jq -r '.transcript_path' > \"/Users/<user>/.claude/tmp_transcript_path\"
}
]
}
],
This generically allows bash commands to read the session, since they can refer to tmp_transcript_path. But it's annoying to have to set this up.
I would propose a simple CLAUDE_TRANSCRIPT_PATH environment variable that is set for the session that bash commands can read from.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗