Claude Code Background Sessions Stop Switching Accounts and /logout Now Works in Them

Claude CodeView original changelog

Claude Code 2.1.323 fixes several cases where a session continued in the background (via /fork, the Left arrow or --bg) moved to a different sign-in or sent a conversation under another account. Such sessions now stop and say so, and /logout in a background session now signs out every session on the computer.

Key Takeaways

  • Background continuation via /fork, Left arrow or --bg could move a session to a different sign-in; that is fixed.
  • Sessions with a missing or overridden profile now stop and say so instead of sending under another account.
  • Users should reopen sessions that were open during the update.
  • A background sign-in now clears the previous account's credentials for every session on the computer.
  • /logout in a background session now signs out all sessions and deletes stored MCP logins and plugin secrets.
  • Sessions opened before sign-in no longer keep signed-out feature flags.

Sessions no longer change sign-in

A session on a named Anthropic profile could move to another sign-in when /fork, the Left arrow or --bg continued it in the background. That is fixed, and Anthropic says to reopen any session that was open during the update. A background session also could send a conversation under another sign-in when its named profile was missing, changed or overridden, and a session using an API key, auth token or workload identity from its shell (not a setup token) could move to another sign-in. In both cases the session now stops and says so. A session handed to an older background service that could not keep its sign-in now tells the user to restart the service.

Clean sign-out

A background session's sign-in used to leave the previous account's login or other credentials in place; it now clears them for every session on the computer. Background sessions also no longer move between a profile and the stored login when an update restarts them, and sessions opened before a sign-in no longer keep signed-out feature flags afterward.

/logout in background sessions

/logout in a background session previously had no effect. It now signs out every session on the computer, deletes stored MCP logins and plugin secrets, and ends the session, as in a terminal.