Compare

Switching Codex accounts. Four ways, compared.

Work account, personal account, a client. Here is what each way of switching between them does, where it falls short, and who it suits. Ours is one of them, and it isn't always the right pick.

Short version: one account now and then, use codex logout and codex login. Terminal only, use one CODEX_HOME per account, by hand or with the free codex-switch CLI. Several accounts open at once in the Codex app and the terminal with one click on a Mac, use Switch for Codex.

Side by side

FeatureSwitch for CodexCODEX_HOME per account (codex-switch CLI or aliases)auth.json switcherslogout + login
Codex CLI accountsYesYesYesYes
Codex app accountsYes, each in its own windowcodex-switch app; by hand with two variablesOne at a time, app restartedLog out and in inside the app
Several accounts open at onceYesYes, one per terminalNo, one active accountNo
Sign in again to switchNo, once per profileNo, once per folderNoYes, every time
Sessions and history per accountYesYesUsually sharedShared
Shows the account per profileEmail and plancodex-switch listMost docodex login status
AGENTS.md, config.toml, MCP serversShared, or own per profileShared by symlink, or ownOne setupOne setup
Runs onmacOS 14+macOS, LinuxDepends on the toolWherever Codex runs
Price$9.99 onceFree, MITMostly free, open sourceFree, built in

Based on each approach as documented on November 24, 2026. Tools change, so check their pages before you decide.

Each option, honestly

codex logout + codex login

Built into Codex. Good: nothing to install. Less good: one account at a time, a browser sign-in on every switch, and both accounts' sessions and history in one ~/.codex. Pick it if you switch rarely.

CODEX_HOME per account

Codex reads its login and state from the folder in CODEX_HOME. One folder per account, each signed in once, and an alias or the free codex-switch CLI to pick one. Good: free, accounts truly separate, several at once. Less good: you manage folders and aliases yourself, and you see which account you get only by asking. Pick it if you live in the terminal. How to set it up.

auth.json switchers

Several open-source tools (menu bar apps, CLIs) keep a copy of each account's auth.json and copy the one you pick into ~/.codex, some restarting the Codex app. Good: quick to switch, often with usage or quota views. Less good: one active account at a time, so two terminals can't use two accounts at once, and sessions and history stay mixed. Pick one if you switch often but never need two accounts at the same moment.

Switch for Codex

Our Mac app. Every account is a profile with its own CODEX_HOME, opened in its own Codex app window or in Terminal, iTerm, Ghostty or Warp, from the app, the menu bar or a floating bar, with the email and plan on every profile and a green dot for what's open. Good: several accounts open at once, in the app and the terminal, without thinking about folders. Less good: Mac only, and it costs $9.99. It uses the same folders as the CLI, so you can start free and move over. Pick it if you use the Codex app or switch many times a day.

Questions

What is the best way to use two Codex accounts?

If you need both at the same time, give each its own CODEX_HOME, by hand, with the free codex-switch CLI, or with the Switch for Codex Mac app. If you switch rarely, codex logout and codex login are enough.

Do auth.json switchers let two accounts run at once?

Generally no. They copy one account's auth.json into ~/.codex, so there is one active account at a time.

Switch for Codex does this with one click on a Mac: every account in its own Codex app window and in your terminal, all open at once, from the app or the menu bar. $9.99 once, no subscription.

Checked November 24, 2026 · All guides