What
A background session is a Claude Code session that keeps running without your terminal attached. An LLM gateway is a proxy your requests to the model go through, usually set with ANTHROPIC_BASE_URL. A gateway set only in your shell is not passed to a background session opened from another folder. Claude Code now marks that case with CLAUDE_BG_GATEWAY_WITHHELD. An environment variable is a named value set in your shell before you start a program.
- When
CLAUDE_BG_GATEWAY_WITHHELDis set andANTHROPIC_BASE_URLis not, sign-in errors show a gateway message: "No LLM gateway: a gateway set in your shell isn't passed to a session opened from another folder." - That message tells you to run
claude respawn <id>from the original folder, or to setANTHROPIC_BASE_URLin anenvblock in your settings. - The status line shows "No LLM gateway: opened from another folder" in place of "Not logged in · Run /login".
CLAUDE_BG_GATEWAY_WITHHELDis now deleted in the same cleanup that removes the otherCLAUDE_BG_*variables, which it was not before.
Before, the same situation produced a generic sign-in failure or "Not logged in · Run /login".
Why
If you reach the model through a gateway, the old login prompt pointed you at the wrong fix. The new message names the missing gateway and the two ways to supply it. Clearing the variable stops the marker from being passed on to sessions that Claude Code starts later.
New in this build: CLAUDE_BG_GATEWAY_WITHHELD