Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.280 ·

claude edit-hook refuses to run when spawned inside a Claude Code session

The 'claude edit-hook' command now refuses to run from inside another Claude Code session

Under the hood Bug Fixes
JSON All of v2.1.280
Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
VSCode ExtensionArea: what it touches
Bug FixesKind: in v2.1.280,
Bug FixesSection of the release
What

The claude edit-hook command, used internally by the VS Code extension to apply a single JSON-formatted edit read from standard input, now checks the CLAUDE_CODE_CHILD_SESSION environment variable. If that variable is set, meaning the command was spawned by Claude Code itself rather than run directly, it logs a telemetry event and returns a refusal message instead of reading and applying the edit.

Why

This stops claude edit-hook from being triggered accidentally from within a nested Claude Code process, which could otherwise apply unintended edits.

Read from
Names in the bundleCLAUDE_CODE_CHILD_SESSION
What the documentation says
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up CLAUDE_CODE_CHILD_SESSION, on Error reference. | `Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker` | [Session saving warnings](#transcript-saving-is-off-child-session-marker) | errors see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up CLAUDE_CODE_CHILD_SESSION, on Error reference.

See this entry in the whole of v2.1.280 →

Feedback