Claude Code✓ Confirmed in official docsAdded Nov 3
How to make claude -p reuse the outer session ID on a self-hosted runner in Claude Code
Claude Code 2.1.317 (November 3) adds the CLAUDE_CODE_DISABLE_NESTED_SESSION_ID environment variable. On a self-hosted runner, it makes a claude -p run inside a session use that session's ID and transcript, as in earlier versions. Set it to 1.
export CLAUDE_CODE_DISABLE_NESTED_SESSION_ID=1
claude -p "summarize this"
The changelog only says it restores the earlier behavior and doesn't describe how the session ID differs without it. The environment variables reference doesn't list it yet. Use it if your runner logs or transcripts were keyed to the outer session ID and changed after upgrading to 2.1.317.
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.