Skip to main content
Claude Code and OpenAI’s Codex CLI each read one stored login. Claude Desktop keeps its login in Claude’s own files, and Pitboard switches it on macOS only. Pitboard keeps every other account’s login in its own store.

Parked logins

A parked login is the login Pitboard holds for an account not in use. Each account has at most one. Enrolling the account in use parks nothing, since a copy would go stale as the tool renews its login. The first switch away parks it. Where parked logins are kept and Why parked logins expire say more.

What a switch does

You start a switch in the app or with pitboard use. Pitboard starts one by itself only for Claude Code, while Switch Automatically is chosen in the app or pitboard watch runs. A Claude Code or Codex switch runs these steps:
  1. Takes Pitboard’s lock, state.lock, so one change runs at a time. Finishes or undoes any interrupted switch.
  2. Identifies the login in use.
  3. Checks the incoming parked login with Anthropic or OpenAI, and renews it if it has lapsed. Every switch needs the network.
  4. For Claude Code, takes the lock a session takes to renew its login, then Claude Code’s write lock. No session can then renew the login being parked. Codex takes no lock.
  5. Records the switch in journal.json, with fingerprints of both logins.
  6. Parks the outgoing login: Claude Code’s OAuth block and account entries, not its MCP server logins, or Codex’s whole auth.json.
  7. Reads the login in use again, and stops with signed_in_account_changed if it changed.
  8. Writes the incoming login where the tool keeps its own.
  9. Reads the login back and records the incoming account as in use, then releases Claude Code’s locks. As read in 2.1.284, a /logout that gives up waiting for the write lock deletes the login anyway, so the read-back comes first.
  10. For Claude Code, copies its config into backups in Pitboard’s directory, then writes the incoming account into the config without profileFetchedAt.
On macOS, a failed keychain write never falls back to Claude Code’s plaintext file. On Windows, where Credential Manager is Claude Code’s store, a failed write there never falls back to .credentials.json either. An automatic switch decides once, under the lock, from the login and files as they are then. Two runs reading the same numbers make one switch. A Claude Desktop switch moves Claude’s files instead, while Claude is closed: What a Claude Desktop switch does has its steps.

Switches that park nothing

Where nothing is signed in to Claude Code or Codex, as on a new computer, a switch puts the incoming login in place and parks nothing. Where the tool has not made its folder yet, Pitboard makes it, private to you. Where Anthropic refuses for good the login Claude Code has in use, that login no longer works and cannot be parked. A switch then stops with live_login_refused and moves nothing. Once you agree, with Replace in the app or pitboard use --yes, it puts the incoming login in place of the refused one. Both run under the same locks, journal and read-back as a switch. A write that does not hold stops with install_failed or replace_failed, and the incoming account keeps its parked login.

Open sessions

Open Claude Code sessions follow a switch within about 33 seconds, with no restart. Anything that runs Codex keeps its account until it starts again. How open sessions follow a switch has the measurements and what can pin a session.

Why Codex logins are moved, not copied

As read in Codex 0.154.0, codex login and codex logout ask OpenAI to revoke the stored login. A copy beside the login in use would be revoked with it at your next sign-in or sign-out. So a switch moves the outgoing login into Pitboard’s store, and reads it back there before writing the incoming one. Finishing or undoing an interrupted switch, pitboard abandon and pitboard repair keep no copy of the login in use either.

Interrupted switches

A crash or Control-C can stop a Claude Code or Codex switch partway, leaving journal.json behind. The next change finishes or undoes it first: pitboard use, enroll, forget, rename, stow, repair, uninstall or the same in the app. It compares the login in use with the journal’s two fingerprints, with no request. pitboard status, doctor, log and renew leave it. Pitboard does not switch by itself meanwhile. A login matching neither fingerprint, usually one the tool renewed since, must be identified first, for Claude Code by Anthropic. Until then, every change stops without changing anything. Interrupted switches lists what Pitboard says meanwhile, and An interrupted switch cannot be finished how to give up on it. A Claude Desktop move settles differently: see Interrupted moves.