{"version":"2.1.318","anchor":"spare-session-boot-claims-a-session-id-from-claude-code-spar","canonical_anchor":"new-env-vars-claude-code-spare-keeps-boot-session-id-and-cla","heading":"New environment variables for spare sessions and held messages","tier":"use","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/spare-session-boot-claims-a-session-id-from-claude-code-spar","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### New environment variables for spare sessions and held messages\n\nTwo new environment variables, one controlling whether a claimed spare process keeps its boot session id, the other about stopping held messages\n\n**What**\n\nTwo new environment variables have been added to the list of runtime tuning variables Claude Code accepts. An environment variable is a named setting passed to a program when it starts. Neither name appeared in the build before this release.\n\n- `CLAUDE_CODE_SPARE_KEEPS_BOOT_SESSION_ID` affects spare processes. A spare process is a copy of Claude Code started ahead of time so it is ready when needed. When a spare process is claimed without a `sessionId` and this variable is not set, the claim now looks up a session id and applies it, recording the reason `spare_claim`. A session is one continuous conversation, and its id is the label that identifies it.\n\n- `CLAUDE_CODE_DISABLE_STOP_OF_HELD_MESSAGES` relates to held messages. The members do not say more about what it does.\n\n**Why**\n\nIn practice, a prewarmed spare process now takes on a looked-up session id when it is claimed, unless `CLAUDE_CODE_SPARE_KEEPS_BOOT_SESSION_ID` is set. Setting that variable keeps the id the process started with. Both variables look like internal switches, not everyday settings.\n\n- Area: Sessions\n- Names: `CLAUDE_CODE_SPARE_KEEPS_BOOT_SESSION_ID`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}