{"version":"2.1.336","anchor":"child-process-env-scrub-now-also-removes-claude-pid-claude","canonical_anchor":"child-process-env-scrub-now-also-removes-claude-pid-claude","heading":"Nested Claude Code sessions no longer inherit plugin and process variables","tier":"notice","area":"Environment Variables","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/child-process-env-scrub-now-also-removes-claude-pid-claude","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Nested Claude Code sessions no longer inherit plugin and process variables\n\nClaude Code now removes CLAUDE_PID, CLAUDE_PLUGIN_ROOT and CLAUDE_PLUGIN_DATA from the environment it hands to child sessions\n\n**What**\n\nEnvironment variables are named values a program passes on to the programs it starts. When Claude Code prepares the environment for a child Claude Code session started from inside another, it already removes variables such as `CLAUDE_CODE_CHILD_SESSION`. It now also removes:\n\n- `CLAUDE_PID`\n\n- `CLAUDE_PLUGIN_ROOT`\n\n- `CLAUDE_PLUGIN_DATA`\n\nA child session started this way no longer inherits them.\n\n**Why**\n\nValues meant for one plugin or hook stop leaking into a separate Claude Code session started inside it. A plugin is an add-on, and a hook is a command Claude Code runs at set moments.\n\n- Area: Environment Variables\n- Names: `CLAUDE_CODE_CHILD_SESSION`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}