How to switch Codex accounts without logging out
The Codex CLI only supports one account at a time. If you need to switch Codex accounts or change between different Codex profiles, you normally have to log out and go through the browser login flow again. CodexUse fixes this by letting you switch accounts from the system tray in under a second.
The problem: one account at a time
The Codex CLI stores your credentials locally. There is no built-in command to switch accounts or manage
multiple Codex profiles. When you run codex and authenticate, it overwrites whatever credentials
were there before.
To change your Codex account with the native CLI, you need to:
- Log out (remove the stored credentials)
- Run codex again
- Complete the browser login flow
- Wait for authentication to complete
This gets tedious fast if you switch Codex accounts multiple times a day.
Why you might need multiple Codex profiles
- Client separation: Keep client work on a dedicated account for billing and audit purposes.
- Rate limit distribution: ChatGPT Plus accounts have usage limits. Multiple Codex profiles let you continue working when one hits 429s.
- Team accounts: Enterprise and Team workspaces have their own auth that should not mix with personal use.
- Testing: Verify behavior across different subscription tiers.
How to switch Codex accounts with CodexUse
CodexUse is a desktop companion for the Codex CLI that manages multiple Codex profiles. Each profile stores your account credentials so you can switch between them instantly.
Switching accounts
- Open CodexUse from the menu bar (macOS) or system tray (Linux)
- Click the profile you want to activate from the list
- See the confirmation in the status indicator. The switch is instant, no browser needed
- Run codex in your terminal. It now uses the selected account
Adding a new Codex profile
- Click Add Profile in CodexUse
- Give it a recognizable name (e.g., "client-acme" or "personal")
- Complete the one-time browser authentication
- The profile is saved and ready to switch to anytime
How to log out of Codex CLI
If you need to fully log out of Codex CLI (not just switch accounts), you have a few options:
- With CodexUse: Delete the profile from the profile list
- Manually: Remove the stored auth credentials from the Codex config directory
With CodexUse, you rarely need to fully log out. Just switch to a different profile instead.
Troubleshooting
| Symptom | Likely cause | Action |
|---|---|---|
| Switch shows success but CLI uses old account | Terminal has cached environment | Open a new terminal window or run codex again |
| Profile shows expired token error | Refresh token was invalidated | Delete the profile and re-add it with fresh authentication |
| Cannot switch Codex accounts | CodexUse is not running | Launch CodexUse from Applications |
Best practices for multi-account workflows
- Name profiles clearly: Use patterns like
personal,client-acme,work-team - Check before long jobs: Confirm you are on the right Codex profile before running expensive completions
- Keep a low-usage profile: Reserve one account for emergencies when others hit rate limits
- Use auto-roll (Pro): CodexUse Pro can automatically switch Codex accounts when one approaches rate limits
Related
Can I switch Codex accounts without logging out?
Yes, with CodexUse. The native CLI only supports one account. CodexUse lets you save multiple Codex profiles and switch between them instantly.
How do I change my Codex account?
With CodexUse, click on a different profile in the app. No browser login needed.
How do I log out of Codex CLI?
Delete the profile in CodexUse, or remove the stored auth credentials manually. With CodexUse, you can just switch to a different profile instead of fully logging out.