{"name":"CLAUDECODE","slug":"claudecode","family":"env","title":"Environment variables","noun":"environment variable","description":"Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, [hook](\/docs\/en\/hooks) commands, [status line](\/docs\/en\/statusline) commands, stdio [MCP server](\/docs\/en\/mcp) subprocesses). IDE extensions also set this in their integrated terminals. Use to detect when a script is running inside a subprocess spawned by Claude Code. To check whether the current process was spawned directly by a tool call or hook, rather than inside a stdio MCP server that Claude Code started, use `CLAUDE_CODE_CHILD_SESSION` instead","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.160","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":129,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.304","anchor":"low-disk-low-memory-watchdog-with-new-warn-thresholds","heading":"Warnings when disk space or memory runs low","line":"Claude Code can warn you, and tell Claude, when free disk space or memory drops below limits you set with two new environment variables","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text"},{"version":"2.1.304","anchor":"diskmemory-watchdog-no-longer-depends-on-claude-code-diagno","heading":"Low disk and memory watchdog no longer needs the diagnostics variable","line":"The watchdog that warns about low disk space or memory no longer requires CLAUDE_CODE_DIAGNOSTICS_FILE to be set before it can start","released_at":"2026-10-19 19:47:15","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.228","anchor":"claude-code-cowork-frame-artifacts-forces-artifact-permissio","heading":"CLAUDE_CODE_COWORK_FRAME_ARTIFACTS forces artifact permissions to be re-asked","line":"A new environment variable makes every artifact write and republish ask permission again instead of remembering approval.","released_at":"2026-08-11 17:45:45","reason":"found in this entry's text"},{"version":"2.1.75","anchor":"removed","heading":"","line":null,"released_at":"2026-03-13 15:51:07","reason":"found in this entry's text"},{"version":"2.1.40","anchor":"nested-session-detection","heading":"Nested Session Detection","line":null,"released_at":"2026-02-12 00:55:05","reason":"found in this entry's text"}],"entries_total":6,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"api","path":"api\/beta\/organization\/analytics","title":"Analytics","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/connectors","title":"Connectors","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/connectors\/list","title":"Get Connector Usage","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/plugins","title":"Plugins","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/plugins\/list","title":"Get Plugin Usage","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/skills","title":"Skills","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/skills\/list","title":"Get Skill Usage","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/users","title":"Users","documented":false},{"source":"api","path":"api\/beta\/organization\/analytics\/users\/list","title":"List User Activity","documented":false}],"docs_total":13,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claudecode","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}