{"version":"2.1.333","anchor":"background-session-env-forwarding-gains-host-keeps-route-ho","canonical_anchor":"new-host-env-vars-claude-code-host-keeps-route-and-claude-co","heading":"New host environment variables CLAUDE_CODE_HOST_KEEPS_ROUTE and CLAUDE_CODE_HOST_KEPT_ENV, passed on to background sessions","tier":"use","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/background-session-env-forwarding-gains-host-keeps-route-ho","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### New host environment variables CLAUDE_CODE_HOST_KEEPS_ROUTE and CLAUDE_CODE_HOST_KEPT_ENV, passed on to background sessions\n\nClaude Code reads two new host variables and now passes them, plus two new disable switches, into background and tmux sessions it starts\n\n**Unclear.** What each of the four variables actually changes is not stated.\n\n**What**\n\nClaude Code reads two new environment variables. An environment variable is a setting you give a program when you start it. Both appear to be meant for an app that runs Claude Code inside itself.\n\n- `CLAUDE_CODE_HOST_KEEPS_ROUTE`: when set, Claude Code reports the capability `host_keeps_route_v1`.\n\n- `CLAUDE_CODE_HOST_KEPT_ENV`: a comma-separated list of variable names. Upper and lower case are treated as the same.\n\nWhen Claude Code starts a background session, which is a separate Claude Code run working on its own, the new session now receives four more variables if they are set in the session that started it:\n\n- `CLAUDE_CODE_HOST_KEEPS_ROUTE`\n\n- `CLAUDE_CODE_HOST_KEPT_ENV`\n\n- `CLAUDE_CODE_DISABLE_SUBAGENT_NAMES`\n\n- `CLAUDE_CODE_DISABLE_IN_PLACE_DELTAS`\n\nThe tmux launcher also passes `CLAUDE_CODE_HOST_KEEPS_ROUTE` and `CLAUDE_CODE_HOST_KEPT_ENV` into the sessions it opens. The four names are added to the lists of variables that are allowed through. The record of each started session also gains a `fromOrdinaryContainer` field.\n\n**Why**\n\nIf you set any of these variables, they now carry over to background and tmux sessions, so those sessions behave like the one you started from. The two disable variables look like off switches for subagent names and in-place updates. Nothing documents these variables yet.\n\n- Area: Sessions\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}