promptgarten 🌱

Command reference Β· Codex CLI

/quit

Exits the session.

/quit immediately ends the running Codex CLI session. You type the command into the composer and confirm with Enter, upon which the session closes. According to the doc, /quit is functionally identical to /exit β€” both end the same session, /exit is just an alternative spelling. Alternatively, the session can also be closed with Ctrl+C. The doc explicitly advises using the command only after you've saved or committed important changes: Codex ends immediately, without asking beforehand or saving automatically. Unlike /cloud-environment or /project, for example, /quit is clearly documented with its own doc section as part of the pure terminal session.

πŸ”„ THE SAME TASK (β€œEXIT”) ON OTHER PLATFORMS

Compare all 28 tasks β†’

βœ… WHEN TO USE IT?

The work is finished

After committing all your changes, type /quit to end the session cleanly.

Controlled instead of a hard close

Instead of force-closing the terminal window, use /quit so Codex ends the session in an orderly way.

β›” WHEN NOT TO?

Changes aren't saved yet

According to the doc, Codex ends the session immediately β€” unsaved work is lost.

Better: Commit or save first, then call /quit or /exit.

SOURCES

MORE COMMANDS Β· Codex CLI

/model/permissions/status/plan/review/diff/resume/new/fork/mcp/skills/goal

All commands Β· Codex CLI β†’

Share:𝕏inπŸ’¬