Codex Reset Handbook: Session, Context and Login Scenarios
There is no one-shot codex reset command - start a fresh session with /new, clear screen and context with /clear, re-authenticate via /logout, and check quota windows with /status. Pick your scenario, fix it in 30 seconds.
First, identify which "reset" you need
"\"Codex has no single command that resets everything. \\\"Reset\\\" spans three distinct scenarios: (1) a clean session without prior context, (2) clearing the terminal screen and context indicator, (3) re-authenticating a broken login. Quota exhaustion is scenario four - see our Codex Usage Limits guide instead.\""
Scenario 1 - session reset (most common)
- Type /new: opens a new session without leaving the CLI; prior conversation no longer influences answers
- Type /clear: clears the terminal screen and resets context plus token-usage indicators (resets context since 0.20.0)
- Beware /delete: permanently removes a saved session and its branches; use /archive to just tidy the list
- Continuing earlier work: /resume to pick a saved session from history
Scenario 2 - long session without losing context
- /compact keeps the key points while shortening context
- Before /new, run /status or /diff to confirm progress, then restate key premises as the first message
Scenario 3 - login/auth reset
- /logout in-session, then sign in again with your ChatGPT account
- Terminal-level re-auth: codex --login
- On startup failures run codex doctor first before reinstalling
When reset doesn't work
- Context still present: make sure you typed /clear, not just a screen-clear shortcut
- Usage looks stale: /status is the authoritative readout for your windows
- Suspected client bug: upgrade the CLI and retry
FAQ
codex reset not working - what now?
Match the command to the target: /new for a session, /clear for context, /logout for auth. If context persists, update the CLI and retry; always trust /status for quota.
Difference between /clear and /new?
/new starts a fresh session but keeps your terminal screen; /clear clears the screen AND resets context/usage indicators.
Can I recover history after a session reset?
Yes. /new and /clear don't touch saved sessions - /resume restores them. /delete is the only irreversible removal.
Does codex reset restore my quota?
No. Session commands never change usage windows; check /status for reset times, see our Usage Limits guide for mechanics.
401 error after resetting codex?
Auth issue: /logout then sign in again, or run codex --login in the terminal; codex doctor diagnoses startup failures.