TUI should treat bare exit and quit as exit commands

Resolved 💬 2 comments Opened Jun 12, 2026 by icankeep Closed Jun 16, 2026

What version of Codex CLI is running?

codex-cli 0.139.0

What subscription do you have?

ChatGPT plan (not relevant to this local TUI input behavior)

Which model were you using?

Not model-specific.

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iTerm2 3.5.14

Codex doctor report

codex doctor --json is available. The report shows the install/runtime are locally consistent, but network reachability checks fail in this sandboxed environment, which is unrelated to this local composer behavior.

What issue are you seeing?

In the TUI composer, typing exit or quit and pressing Enter submits that word as a normal prompt instead of exiting the session.

This is surprising because /exit is the explicit slash command for the same action, and a bare exit/quit is a common shell-style exit affordance. The result is that users can accidentally send exit to the model when they intended to leave the TUI.

What steps can reproduce the bug?

  1. Open Codex CLI in TUI mode.
  2. Type exit into the composer.
  3. Press Enter.

The same behavior occurs with quit.

What is the expected behavior?

When slash commands are enabled in the full TUI composer, a bare exit or quit draft should dispatch the existing /exit command.

Whitespace-prefixed values such as exit should still submit as literal text, matching the existing slash-command opt-out behavior. Reusable plain text composer widgets should also be able to keep exit and quit as normal text.

Additional information

This should not affect paste handling: a terminal paste whose first line is exit should continue to be treated as pasted text rather than closing the session.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗