Cmd. /quit
Exit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals.
Key takeaways
- Exit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals.
- Check the input surface and availability before using the examples below.
Purpose
Exit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals.
/quitAvailability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-09-22 · Codex CLI 0.155.1 |
The installed command menu and account or organization settings determine availability.
Examples
/quitWhen to use it
- Use
/quitafter reviewing/diffand cleaning background terminals with/psand/stop. - Use
/resumelater if you need to return to saved work.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/quit | Exits the CLI | You are done with the session |
/exit | Same behavior | You prefer the alternate spelling |
/new | Starts a new chat | You want to stay in the CLI |
Effects and persistence
Exits the CLI conversation. Choose a saved session through resume to continue later.
/quit exits Codex CLI. /exit is equivalent.
Cautions
- Save, commit, or intentionally leave changes before exiting.
- Use
/stopfirst if Codex-owned background terminals should not continue.
Official sources
Complete command list · Verification scope · History for this command