{"version":"2.1.323","anchor":"background-session-env-scrub-extended","canonical_anchor":"background-session-env-scrub-extended","heading":"Background sessions start with more environment variables removed","tier":"notice","area":"Sessions","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/background-session-env-scrub-extended","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### Background sessions start with more environment variables removed\n\nBackground sessions now drop an extra list of environment variables they would otherwise inherit, and get CLAUDE_CODE_SESSION_KIND set to bg\n\n**Unclear.** Which additional environment variables are now removed from background sessions.\n\n**What**\n\nA background session is a Claude Code session that runs without you watching it in the terminal. Environment variables are named settings a program inherits from the shell that started it. When Claude Code builds the environment for a background session, it already removed some variables. It now also removes every variable on a further list.\n\nIt also sets `CLAUDE_CODE_SESSION_KIND` to `bg` in that environment, so commands running there can tell they are in a background session.\n\n**Why**\n\nThis changes which of your own environment variables reach a background session. If something you run in the background relies on a variable from your shell, check that it is still there.\n\n- Area: Sessions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}