Skip to the board
DIDRESET
UTC

How to use Codex or Claude Code with multiple accounts

by vortwangUpdated

Each account keeps its own 5-hour and weekly windows; switching never merges or transfers them. OpenAI's account switcher allows 'a maximum of two accounts active in the switcher per session' and 'Switching is not merging.' Codex CLI: 'run codex logout to clear the current credentials', then 'Run codex login'. Claude Code: /login and /logout, or set CLAUDE_CONFIG_DIR, which Anthropic calls 'Useful for running multiple accounts side by side'. Community switcher tools exist; this site lists them without endorsement.

What the official docs say

Steps

The official layer. ChatGPT's account switcher lets you 'stay signed in to two ChatGPT accounts at the same time and switch between them instantly', with 'a maximum of two accounts active in the switcher per session', and each account stays independent: switching does not 'Combine billing or subscriptions'. In the Codex CLI, credentials are cached in 'auth.json under CODEX_HOME (defaults to ~/.codex)'; 'run codex logout to clear the current credentials' and 'Run codex login, then complete the browser flow' to sign in as someone else. 'The CLI and extension share the same cached login details', so logging out of one logs out the other. In Claude Code, /login is 'Sign in to your Anthropic account' and /logout 'Sign out from your Anthropic account'.

The environment-variable layer. Claude Code documents it directly: CLAUDE_CONFIG_DIR will 'Override the configuration directory (default: ~/.claude)' and is 'Useful for running multiple accounts side by side: for example, alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude''; credentials are kept under that directory, 'so a session with a different CLAUDE_CONFIG_DIR reads a different entry'. Codex documents CODEX_HOME as the directory holding config.toml, profile files and 'CODEX_HOME/auth.json', but does not publish a multi-account recipe built on it; anything beyond 'defaults to ~/.codex' is community practice.

The community layer, and the limits. Tools such as cc-switch, codex-switcher, Codex-Manager and codex-auth (named in openai/codex discussion #25630) swap saved auth files or profiles; this site lists them for orientation only and has not audited their behaviour or terms-of-service standing. Whatever you use, usage is metered per account: 'Check Settings → Usage before a large task to see your remaining allowance, usage windows and reset times' applies to whichever account is signed in, and the other account's windows keep running on their own clocks. Issue #44235 is a user report of the weekly window shown in Codex Desktop jumping between two accounts' values after a switch; if the numbers look mixed, sign out fully and reopen.

  1. Decide which layer you need

    Web and desktop ChatGPT: the built-in switcher ('Open the account menu', 'Select "Add account"'). Codex CLI: sign out and in. Claude Code: /login, or a separate CLAUDE_CONFIG_DIR per account. Only reach for a community tool if the official paths are too slow for you.

  2. ChatGPT and Codex app: add the second account

    'Open the account menu', 'Select "Add account"', 'Sign in or create a new account.' 'You do not need to log out of your current account to add another one.' Two accounts can be active per session; 'you'll need to log out to access more than two at once.'

  3. Codex CLI: sign out, then sign in as the other account

    'For stored authentication, run codex logout to clear the current credentials', or type /logout inside a session ('Sign out of Codex. Clear local credentials when using a shared machine.'). Then 'Run codex login, then complete the browser flow.' Because 'The CLI and extension share the same cached login details', the IDE extension follows.

  4. Claude Code: /login, or one config directory per account

    Type /logout then /login to change accounts in place. To keep both signed in, start each with its own directory: Anthropic's own example is alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'. Each directory holds its own credentials, so the two sessions never share a login.

  5. Check the limits of the account you just switched to

    Codex: /status prints the "5h limit" and "Weekly limit" bars for the signed-in account; Settings → Usage shows the same. Claude Code: /usage. The other account's windows did not move; they refill on their own clocks.

  6. If the numbers look mixed, sign out fully

    Issue #44235 reports Codex Desktop showing one account's weekly window after signing into another. That is a user report, not a documented behaviour; the safe reset is to log out, fully quit the app, reopen and sign in again, then re-read Settings → Usage.

FAQ

If I switch accounts, do my two allowances add up?

No. 'Switching is not merging.' Each account has its own 5-hour and weekly windows, its own banked resets and its own credits; switching only changes which account's allowance your next request draws from. Nothing transfers between them.

Is running two accounts against OpenAI or Anthropic terms?

OpenAI documents the account switcher for keeping work and personal usage separate, and Anthropic documents CLAUDE_CONFIG_DIR for running multiple accounts side by side. Neither help page discusses using a second personal subscription to get around limits; this site does not advise on terms of service, and community switcher tools carry their own disclaimers.

Can I set CODEX_HOME to keep two Codex logins?

OpenAI's docs say credentials live in 'auth.json under CODEX_HOME (defaults to ~/.codex)' and that profile files sit at $CODEX_HOME/profile-name.config.toml, but they do not publish a multi-account recipe. Community tools automate swapping auth files; this site lists them without endorsement.

Does a global reset on the board apply to all my accounts?

A global reset "refreshes the eligible usage limits specified in the announcement" for every eligible account, so each of your accounts is refreshed on its own if it meets the announcement's eligibility. Banked resets, by contrast, are granted per account and must be redeemed in that account.

Sources

  1. OpenAI Help Center: Use multiple accounts with account switching (article 20001068, read via Wayback snapshot dated 2026-06-02)verified 2026-09-18
  2. Codex docs: Authentication (learn.chatgpt.com): codex login, codex logout, login caching in auth.json under CODEX_HOMEverified 2026-09-18
  3. Codex CLI docs: Slash commands (learn.chatgpt.com): /logout, /status, /usageverified 2026-09-18
  4. Codex docs: Config reference (learn.chatgpt.com): $CODEX_HOME profile files and CODEX_HOME/auth.jsonverified 2026-09-18
  5. Claude Code docs: Slash commands (/login "Sign in to your Anthropic account", /logout, /usage)verified 2026-09-18
  6. Claude Code docs: Environment variables (CLAUDE_CONFIG_DIR: "Useful for running multiple accounts side by side")verified 2026-09-18
  7. Claude Code docs: Authentication (credentials kept under CLAUDE_CONFIG_DIR; /login and /logout manage .credentials.json)verified 2026-09-18
  8. OpenAI Help Center: Managing usage with GPT-6 Astra in Work and Codex (article 20001516, read via Wayback snapshot dated 2026-09-16)verified 2026-09-18
  9. openai/codex discussion #25630 (2026-06-01): "Switch Between Accounts" (user request; community tools named in replies)verified 2026-09-18
  10. openai/codex issue #44235 (2026-09-09, user report): weekly quota/reset window switches after logging into another accountverified 2026-09-18
  11. Community tool: farion1231/cc-switch (GitHub; not endorsed by this site)verified 2026-09-18
  12. Community tool: Lampese/codex-switcher (GitHub; not endorsed by this site)verified 2026-09-18
  13. Community tool: qxcnm/Codex-Manager (GitHub; not endorsed by this site)verified 2026-09-18
  14. Community tool: Loongphy/codex-auth (GitHub; named in discussion #25630; not endorsed by this site)verified 2026-09-18

Want the next reset on your phone?

Sponsors