Cmd. /exit
Exit the Codex CLI session; equivalent to /quit.
Key takeaways
- Exit the Codex CLI session; equivalent to /quit.
- Check the input surface and availability before using the examples below.
Purpose
Exit the Codex CLI session; equivalent to /quit.
/exitAvailability
| 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
/exitWhen to use it
- Run
/diffor/statusbefore exiting a session with meaningful local changes. - Use
/exitwhen your team prefers explicit shell-like naming over/quit.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/exit | Exits the CLI | You prefer the shell-style spelling |
/quit | Exits the CLI | You use the primary slash command name |
/new | Starts a new conversation | You want to stay in the CLI |
Effects and persistence
Exits the CLI conversation. Choose a saved session through resume to continue later.
/exit exits the CLI. It is the alternative spelling of /quit.
Cautions
- Save, commit, or intentionally discard important work before exiting.
/exitdoes not replace process cleanup for externally started commands.
Official sources
Complete command list · Verification scope · History for this command