{"name":"CLAUDE_CODE_CHILD_SESSION","slug":"claude-code-child-session","family":"env","title":"Environment variables","noun":"environment variable","description":"Set to `1` in subprocesses Claude Code spawns via the Bash, PowerShell, and Monitor tools, [hook](\/docs\/en\/hooks) commands, and [status line](\/docs\/en\/statusline) commands. Not set for stdio [MCP server](\/docs\/en\/mcp) subprocesses, which are long-lived and outlive the session that spawned them. Unlike `CLAUDECODE`, this is only set by Claude Code itself when it launches a subprocess and not by IDE extensions, so it reliably distinguishes a nested session from a top-level `claude` launched in an IDE-integrated terminal. A nested interactive `claude` TUI started this way is automatically excluded from `--resume`, `--continue`, up-arrow history, and the `claude agents` list. Non-interactive `claude -p` sessions still persist. Set `CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1` to override this exclusion. Requires Claude Code v2.1.172 or later","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.172","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":120,"mined_builds":150,"first_cited":{"version":"2.1.172","released_at":"2026-06-10 17:55:48","spans":1}},"aliases":[],"entries":[{"version":"2.1.309","anchor":"remote-control-sandbox-testvm-option-spawn-mode-and-trust","heading":"Remote control setup gets internal changes to sandbox and repository checks","line":"Remote control now handles git repository detection separately from the worktree hook check, and its tool host accepts a test VM option","released_at":"2026-10-22 20:34:13","reason":"found in this entry's text"},{"version":"2.1.286","anchor":"skillchromeworktree-editor-clis-share-a-session-guard","heading":"Editor commands now share one check for being run inside a session","line":"The skill, Chrome and worktree editor commands now use one shared check before refusing to run from inside a Claude Code session","released_at":"2026-09-30 17:14:38","reason":"found in this entry's text, named in this entry"},{"version":"2.1.285","anchor":"hidden-drop-worktree-registrations-cli-subcommand-for-the","heading":"Hidden command lets the VS Code extension clear out deleted worktrees","line":"A hidden `claude drop-worktree-registrations` command, used by the VS Code extension, removes git's records of deleted worktrees","released_at":"2026-09-29 17:32:09","reason":"found in this entry's text"},{"version":"2.1.284","anchor":"new-message-blocking-claude-design-sign-in-from-inside-a-cla","heading":"New message about signing in to Claude Design from inside a Claude Code session","line":"Claude Code includes a new error saying Claude Design cannot be signed in from inside a Claude Code session","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text, named in this entry"},{"version":"2.1.280","anchor":"claude-edit-hook-refuses-to-run-when-spawned-inside-a-claude","heading":"claude edit-hook refuses to run when spawned inside a Claude Code session","line":"The 'claude edit-hook' command now refuses to run from inside another Claude Code session","released_at":"2026-09-22 15:44:39","reason":"found in this entry's text, named in this entry"},{"version":"2.1.280","anchor":"three-new-hidden-cli-settings-edit-commands-for-the-vs-code","heading":"Three new hidden CLI settings-edit commands for the VS Code extension","line":"Three new hidden CLI commands let the VS Code extension edit skill, sandbox, and Chrome settings","released_at":"2026-09-22 15:44:39","reason":"found in this entry's text"},{"version":"2.1.269","anchor":"claude-plugin-eval-init-can-delegate-the-authoring-intervi","heading":"claude plugin eval init can delegate the authoring interview to a parent Claude Code session","line":"`claude plugin eval init` can now hand its interview off to the parent Claude Code session instead of failing without a terminal","released_at":"2026-09-11 18:12:49","reason":"found in this entry's text"},{"version":"2.1.269","anchor":"claude-plugin-eval-skips-auto-publishing-its-report-when-t","heading":"'claude plugin eval' skips auto-publishing its report when the run looks like it was launched by Claude Code itself","line":"'claude plugin eval' no longer auto-publishes reports when the run looks machine-launched rather than started by a person","released_at":"2026-09-11 18:12:49","reason":"found in this entry's text"},{"version":"2.1.267","anchor":"projectsownerrowsforwarding-owner-row-credit-forwarding-gat","heading":"projectsOwnerRowsForwarding: owner-row credit forwarding gated behind NPt()\/vsr()","line":"A new owner-row credit-forwarding feature for auto mode is gated behind conditions and disabled in nested or teammate sessions","released_at":"2026-09-09 18:25:42","reason":"found in this entry's text, named in this entry"},{"version":"2.1.217","anchor":"transcript-persistence-warnings","heading":"Transcript Persistence Warnings","line":null,"released_at":"2026-07-21 19:55:38","reason":"found in this entry's text"}],"entries_total":11,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"errors","title":"Error reference","documented":false},{"source":"claude-code","path":"plugins\/cli-hints","title":"Recommend your plugin from your CLI","documented":false}],"docs_total":4,"gates":[],"related":[{"name":"CLAUDE_CODE_3P_PROBE_WROTE_HAIKU_DEFAULT","slug":"claude-code-3p-probe-wrote-haiku-default","description":"If your cloud account cannot use a model, Claude Code can step down to the next one; `CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK` turns this off"},{"name":"CLAUDE_CODE_3P_PROBE_WROTE_OPUS_DEFAULT","slug":"claude-code-3p-probe-wrote-opus-default","description":"Internal marker on third-party providers. When Claude Code itself writes `ANTHROPIC_DEFAULT_OPUS_MODEL` into its environment (the model availability probe on Bedrock, Vertex or Mantle, or a move down the model fallback ladder), it sets this variable to the same model ID. An `ANTHROPIC_DEFAULT_OPUS_MODEL` equal to it is treated as Claude Code's own choice rather than a user pin: it does not count as pinned, the probe does not skip it, and the fallback ladder may move it."},{"name":"CLAUDE_CODE_3P_PROBE_WROTE_SONNET_DEFAULT","slug":"claude-code-3p-probe-wrote-sonnet-default","description":"On third-party providers, Haiku model names are no longer skipped by the check that sets up the Sonnet default model"},{"name":"CLAUDE_CODE_3P_SEEDED_OPUS_DEFAULT","slug":"claude-code-3p-seeded-opus-default","description":"If your cloud account cannot use a model, Claude Code can step down to the next one; `CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK` turns this off"},{"name":"CLAUDE_CODE_3P_SEEDED_SONNET_DEFAULT","slug":"claude-code-3p-seeded-sonnet-default","description":"If your cloud account cannot use a model, Claude Code can step down to the next one; `CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK` turns this off"},{"name":"CLAUDE_CODE_ACCESSIBILITY","slug":"claude-code-accessibility","description":"Set to `1` to keep the native terminal cursor visible and disable the inverted-text cursor indicator. Allows screen magnifiers like macOS Zoom to track cursor position"},{"name":"CLAUDE_CODE_ACCOUNT_TAGGED_ID","slug":"claude-code-account-tagged-id","description":"Overrides the `user.account_id` attribute Claude Code attaches to its OpenTelemetry data. It applies only when an account UUID is known and `OTEL_METRICS_INCLUDE_ACCOUNT_UUID` is not turned off (default on); when unset or empty, `user.account_id` is derived from the account UUID as a tagged ID of the form `user_01...`."},{"name":"CLAUDE_CODE_ACCOUNT_UUID","slug":"claude-code-account-uuid","description":"The device bridge is skipped entirely when the host's account UUID doesn't match the stored one."},{"name":"CLAUDE_CODE_ACT_DONT_REDERIVE","slug":"claude-code-act-dont-rederive","description":"Three existing feature gates moved position; their defaults are unchanged."},{"name":"CLAUDE_CODE_ACTION","slug":"claude-code-action","description":"Marks a run as coming from the Claude Code GitHub Action. A truthy value (`1`, `true`, `yes` or `on`) makes Claude Code set `CLAUDE_CODE_ENTRYPOINT` to `claude-code-github-action`, but only when `CLAUDE_CODE_ENTRYPOINT` is not already set and the command is not `claude mcp serve`. It is also reported as `isClaudeCodeAction` in the environment details attached to telemetry."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-child-session","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}