Follow Discord
Sweep 03 Nov 2026 · 22:27Z Build v2.1.318 536 read Stable v2.1.311 Latest v2.1.318 Next v2.1.318 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.317 ·

Nested Claude Code sessions stop inheriting the parent's session id

A Claude Code started from inside another no longer takes the parent's session id, and CLAUDE_CODE_DISABLE_NESTED_SESSION_ID brings it back

You'll notice Improvements
JSON All of v2.1.317
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SessionsArea: what it touches
ImprovementsKind: in v2.1.317,
ImprovementsSection of the release

Unclear What a user sees differently when a nested session has no inherited id is not shown.

What

A session is one run of Claude Code, with its own id. Claude Code sets CLAUDE_CODE_CHILD_SESSION in programs it starts, such as commands run through its Bash tool or hooks. A Claude Code started that way no longer inherits the parent's session id when all of these hold:

Setting CLAUDE_CODE_DISABLE_NESTED_SESSION_ID turns this off, so the child inherits the parent's id again.

Why

A Claude Code you run from inside another one no longer carries the parent's session id by default. If something you use relied on that id being passed down, the environment variable restores it.

Read from
Names in the bundleCLAUDE_CODE_CHILD_SESSION
What the documentation says
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhat a user sees differently when a nested session has no inherited id is not shown.
Anthropic's release notes agreeAdded CLAUDE_CODE_DISABLE_NESTED_SESSION_ID: set it to 1 on a self-hosted runner to have claude -p run inside a session use that session's…

See this entry in the whole of v2.1.317 →

Feedback