{"version":"2.1.337","anchor":"warning-when-claude-code-oauth-token-is-set-and-a-background","canonical_anchor":"warning-when-claude-code-oauth-token-is-set-and-a-background","heading":"Clearer warning when CLAUDE_CODE_OAUTH_TOKEN is set and you ask for a background session","tier":"notice","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/warning-when-claude-code-oauth-token-is-set-and-a-background","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Clearer warning when `CLAUDE_CODE_OAUTH_TOKEN` is set and you ask for a background session\n\nWith `CLAUDE_CODE_OAUTH_TOKEN` set, asking for a background session now explains the token won't carry over and what to do\n\n**What**\n\n`CLAUDE_CODE_OAUTH_TOKEN` is an environment variable that signs you in with a token. A background session is one that keeps running separately from your terminal. If you request one while this variable is set, Claude Code's message now explains that the token wouldn't reach the background session, which would use a different sign-in. It suggests either keeping working in the terminal or starting Claude Code without the variable.\n\n**Why**\n\nIf you sign in with a token, you are told plainly instead of ending up in a background session signed in another way.\n\n- Area: Sessions\n- Names: `CLAUDE_CODE_OAUTH_TOKEN`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}