Add your first account
Open the account dashboard
Launch the interactive account management dashboard:The dashboard will open in your terminal with a list of saved accounts (empty on first run).
Add a new account
In the dashboard:
- Select Add New Account using arrow keys and press
Enter - Your browser will open to the ChatGPT OAuth consent page
- Approve the authorization request
- Return to your terminal
The OAuth callback runs on
http://127.0.0.1:1455/auth/callback. Ensure port 1455 is available.Verify account storage
List your saved accounts to confirm the new account was added:You should see output showing your newly added account marked as active:
Add additional accounts
For multi-account rotation and failover, add more accounts:Repeat the login flow
Open the dashboard again and add another account:Select Add New Account and complete OAuth for a different ChatGPT account.
Essential commands
Now that you have accounts configured, try these day-1 commands:Dashboard hotkeys
When you’re in the interactive dashboard (codex auth login), use these keyboard shortcuts:
Main dashboard
| Key | Action |
|---|---|
Up / Down | Move selection |
Enter | Select/open |
1-9 | Quick switch to account by number |
/ | Search accounts |
? | Toggle help |
Q | Back/cancel |
Account details
| Key | Action |
|---|---|
S | Set as current account |
R | Refresh/re-login account |
E | Enable/disable account |
D | Delete account |
Verify your setup
Run this full verification sequence to ensure everything is working:The
--json flag outputs machine-readable JSON instead of human-friendly terminal output. Useful for automation and logging.Common first-run issues
Command not recognized
Command not recognized
If If none work, verify your global npm installation path is in your
codex auth is not recognized:PATH environment variable.OAuth callback fails on port 1455
OAuth callback fails on port 1455
The OAuth server binds to After freeing the port, retry
127.0.0.1:1455. If you see port binding errors:codex auth login.Switch succeeds but wrong account is active
Switch succeeds but wrong account is active
If
codex auth switch <index> completes but the wrong account appears active:-
Run the switch command again:
- Restart your terminal session
-
Verify with:
Token errors (missing id_token, token_expired, refresh_token_reused)
Token errors (missing id_token, token_expired, refresh_token_reused)
If you see OAuth token errors:Or delete and re-add the account:
Stale or incorrect account data
Stale or incorrect account data
If account data appears stale:
60-second recovery
If anything goes wrong, run this recovery sequence:Storage locations
Codex Multi-Auth stores configuration and account data in these locations:| File | Default path |
|---|---|
| Settings | ~/.codex/multi-auth/settings.json |
| Accounts (global) | ~/.codex/multi-auth/openai-codex-accounts.json |
| Accounts (per-project) | ~/.codex/multi-auth/projects/<project-key>/openai-codex-accounts.json |
| Flagged accounts | ~/.codex/multi-auth/openai-codex-flagged-accounts.json |
| Quota cache | ~/.codex/multi-auth/quota-cache.json |
| Logs | ~/.codex/multi-auth/logs/codex-plugin/ |
You can override the root directory with the
CODEX_MULTI_AUTH_DIR environment variable.Next steps
Features
Explore advanced features like project-scoped accounts and session affinity
Configuration
Customize settings and environment variables
Commands reference
Complete reference for all
codex auth commandsTroubleshooting
Detailed troubleshooting guide for common issues