Codex CLI account guide

How to Use Multiple Codex CLI Accounts on Mac

ChatGPT can keep work and personal accounts separate on the web, but Codex CLI has its own cached login. A reliable workflow verifies that CLI identity and avoids replacing the rest of your Codex configuration.

Published Updated 6 minute read

Limit Lifeboat showing a Codex CLI account alongside separate Claude Code accounts, with usage and active-login status.
Codex CLI and ChatGPT on the web are separate surfaces, and the menu bar shows which one the CLI is on.

How do you change the Codex CLI account?

Use codex login status to inspect the active authentication method. To change accounts manually, clear the cached CLI login with codex logout, run codex login, and complete OpenAI’s browser flow with the intended account and workspace.

codex login status
codex logout
codex login

OpenAI documents these commands and the available credential stores in Codex authentication. Signing in with ChatGPT uses subscription access; signing in with an API key uses metered API billing instead.

Why does ChatGPT account switching not cover Codex CLI?

OpenAI supports keeping two accounts signed in on ChatGPT web, commonly for work and personal separation. Its account-switching documentation says that each account keeps independent chats, memory, history, billing, and workspaces. It also states that this switcher is not currently supported in Codex desktop.

Codex CLI caches its own authentication, shared with the Codex IDE extension according to OpenAI’s current documentation. Changing the active browser account therefore does not prove that a terminal is using the same identity. Check the CLI before opening a sensitive repository or consuming a managed workspace’s allowance.

This is the same trap that catches Claude Code users, for the same reason: the browser and the terminal hold independent sessions. Keeping work and personal accounts separate covers the habits that make the boundary visible.

What does a scoped Codex switch write?

Limit Lifeboat captures the authenticated Codex account as a named local profile and stores its app-managed credential snapshot in macOS Keychain. The menu-bar view then keeps each account’s identity, last usage reading, reading age, and active state visible.

A requested switch preserves unrelated Codex and MCP settings, stages private rollback material, restores the selected identity, and validates it before reporting success. A failed validation rolls back. If another process changes the live credentials during the transaction, the app does not overwrite that newer external change.

For Codex the write is scoped to four keys in ~/.codex/auth.json: auth_mode, tokens, OPENAI_API_KEY, and last_refresh. Anything else in that file, and every other file under ~/.codex, is left as it was.

Limit Lifeboat switches one global Codex CLI login at a time. It does not start parallel isolated Codex homes or switch ChatGPT Desktop. Manual switching is the default; optional switching at 5% session remaining or 1% weekly remaining is disabled until you explicitly enable it.

What are the workspace and billing boundaries?

Use a managed work account only for activity authorized by that organization. OpenAI notes that workspace policies, roles, retention, and administrative controls follow the account used to sign in. A personal account stays independent from the managed workspace.

Account switching must not be presented as a way to circumvent provider restrictions. OpenAI’s Terms of Use prohibit circumventing rate limits or restrictions. Limit Lifeboat does not merge allowances, share accounts between people, or alter a provider’s enforcement.

To manage the other supported CLI, read how to switch Claude Code accounts on Mac. For what Codex actually reports about its limits, including earned resets, see Codex CLI rate limits explained. When two tools report different remaining usage, the reasons are knowable.

Questions and boundaries

Does the ChatGPT account switcher also switch Codex CLI?

No. OpenAI’s account switcher applies to ChatGPT web and is not currently supported in Codex desktop. Codex CLI keeps its own cached authentication, so verify the CLI separately.

Where does Codex CLI keep authentication?

OpenAI documents that Codex caches credentials in its configured credential store, which may be auth.json under CODEX_HOME or the operating-system credential store. Treat either location as sensitive.

Does Limit Lifeboat switch the ChatGPT desktop app?

No. It changes only Codex CLI authentication fields. ChatGPT web, ChatGPT Desktop, and Codex CLI remain separate sessions.

Can I mix a ChatGPT subscription account and an API key account?

Yes, but they bill differently. Signing in with ChatGPT uses your subscription allowance, while signing in with an API key uses metered API billing. Limit Lifeboat reports subscription usage windows; it does not estimate API spend.

Free and open source

Verify the Codex CLI identity before you start.

Monitor usage and switch deliberately without replacing the rest of your setup.

Download for Mac