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
| Feature | Switch for Codex | CODEX_HOME per account (codex-switch CLI or aliases) | auth.json switchers | logout + login |
|---|---|---|---|---|
| Codex CLI accounts | Yes | Yes | Yes | Yes |
| Codex app accounts | Yes, each in its own window | codex-switch app; by hand with two variables | One at a time, app restarted | Log out and in inside the app |
| Several accounts open at once | Yes | Yes, one per terminal | No, one active account | No |
| Sign in again to switch | No, once per profile | No, once per folder | No | Yes, every time |
| Sessions and history per account | Yes | Yes | Usually shared | Shared |
| Shows the account per profile | Email and plan | codex-switch list | Most do | codex login status |
| AGENTS.md, config.toml, MCP servers | Shared, or own per profile | Shared by symlink, or own | One setup | One setup |
| Runs on | macOS 14+ | macOS, Linux | Depends on the tool | Wherever Codex runs |
| Price | $9.99 once | Free, MIT | Mostly free, open source | Free, built in |
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.