What
Make it so typing exit or quit (without the leading /) and pressing Enter in the Codex TUI chat composer behaves identically to /exit or /quit.
Why
Users coming from shell or REPL environments instinctively type exit to quit. The current behavior silently submits it as a chat message instead, which is surprising. The fix is a small quality-of-life improvement that aligns Codex with the mental model most CLI users carry.
Proposed approach
In chat_composer.rs, add a try_dispatch_plain_exit_aliases method that checks whether the entire composer input (trimmed) is exactly "exit" or "quit", and if so, dispatches SlashCommand::Exit with the same side-effects as try_dispatch_bare_slash_command. Guarded by slash_commands_enabled() and !is_bash_mode (so typing exit in bash mode still passes through as a shell command).
I have a working implementation with two new tests (plain_exit_requests_exit, plain_quit_requests_exit) that pass alongside the existing slash_commands test suite. Happy to submit a PR if invited.
What
Make it so typing
exitorquit(without the leading/) and pressing Enter in the Codex TUI chat composer behaves identically to/exitor/quit.Why
Users coming from shell or REPL environments instinctively type
exitto quit. The current behavior silently submits it as a chat message instead, which is surprising. The fix is a small quality-of-life improvement that aligns Codex with the mental model most CLI users carry.Proposed approach
In
chat_composer.rs, add atry_dispatch_plain_exit_aliasesmethod that checks whether the entire composer input (trimmed) is exactly"exit"or"quit", and if so, dispatchesSlashCommand::Exitwith the same side-effects astry_dispatch_bare_slash_command. Guarded byslash_commands_enabled()and!is_bash_mode(so typingexitin bash mode still passes through as a shell command).I have a working implementation with two new tests (
plain_exit_requests_exit,plain_quit_requests_exit) that pass alongside the existingslash_commandstest suite. Happy to submit a PR if invited.