Cmd. /quit
Exit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals.
Key takeaways
/quitexits Codex CLI, and/exitis the equivalent alias for the same behavior.- Use it after reviewing
/diffand cleaning background terminals with/psand/stop. - Unlike
/new, which starts a fresh chat while staying in the CLI,/quitends the session entirely; use/resumelater to return to saved work. - Save, commit, or intentionally leave changes before exiting, and use
/stopfirst if Codex-owned background terminals should not continue.
Original Command Declaration
/quitOfficial Summary
/quit exits Codex CLI. /exit is equivalent.
Usage
/quitGood Examples
- Use
/quitafter reviewing/diffand cleaning background terminals with/psand/stop. - Use
/resumelater if you need to return to saved work.
Similar 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 |
Use Cases
- Ending a completed session.
- Leaving the terminal after a review or handoff.
Cautions
- Save, commit, or intentionally leave changes before exiting.
- Use
/stopfirst if Codex-owned background terminals should not continue.
Release Basis
- Judgment: first observed mention
- First evidence version:
rust-v0.53.0 - Date (UTC): 2025-10-31
- Release link: https://github.com/openai/codex/releases/tag/rust-v0.53.0
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features