{"name":"CLAUDE_CODE_CHILD_NOTES_DIR","slug":"claude-code-child-notes-dir","family":"env","title":"Environment variables","noun":"environment variable","description":"A session can now create a private folder and hand its path to the sessions it launches through the `CLAUDE_CODE_CHILD_NOTES_DIR` environment variable","description_source":"entry","described_by":{"version":"2.1.326","anchor":"new-claude-code-child-notes-dir-env-var-is-created-by-one-pr"},"presence":{"first_seen":"2.1.326","removed_in":null,"in_current_build":true,"newest_mined":"2.1.330","builds":5,"mined_builds":169,"first_cited":{"version":"2.1.326","released_at":"2026-11-16 18:43:39","spans":1}},"aliases":[],"entries":[{"version":"2.1.327","anchor":"child-notes-dir-additionally-gated-by-tengu-valiant-honey","heading":"The child notes folder setting can now be switched off remotely","line":"Claude Code now holds back `CLAUDE_CODE_CHILD_NOTES_DIR` when a remote switch says no, though the switch is on unless turned off","released_at":"2026-11-17 20:33:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.326","anchor":"new-claude-code-child-notes-dir-env-var-is-created-by-one-pr","heading":"Claude Code can pass a private notes folder to sessions it launches","line":"A session can now create a private folder and hand its path to the sessions it launches through the `CLAUDE_CODE_CHILD_NOTES_DIR` environment variable","released_at":"2026-11-16 18:43:39","reason":"found in this entry's text, named in this entry"},{"version":"2.1.326","anchor":"new-env-vars-for-child-sessions-are-scrubbed-and-cleared","heading":"More session variables are cleared before starting other processes","line":"Three more environment variables are now removed or unset when Claude Code sets up child sessions and background services","released_at":"2026-11-16 18:43:39","reason":"found in this entry's text"}],"entries_total":3,"docs":[],"docs_total":0,"gates":[],"related":[{"name":"CLAUDE_CODE_CHILD_SESSION","slug":"claude-code-child-session","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"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-child-notes-dir","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}