feat: support "exit" as a keyword to quit the session#2152
Merged
trungutt merged 2 commits intodocker:mainfrom Mar 18, 2026
Merged
feat: support "exit" as a keyword to quit the session#2152trungutt merged 2 commits intodocker:mainfrom
trungutt merged 2 commits intodocker:mainfrom
Conversation
Typing "exit" in the TUI now terminates the session immediately, equivalent to the /exit slash command. The check is case-insensitive and whitespace-trimmed, and runs before slash command parsing so it works even when the agent is busy.
Add "quit" and ":q" as bare keywords (alongside "exit") that quit the session immediately. Also register /quit and /q as slash command aliases for /exit. The bare keyword check is now case-sensitive, matching opencode's implementation.
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This PR cleanly implements support for bare keywords (exit, quit, :q) and slash command aliases (/quit, /q) to quit the session. The implementation is straightforward and consistent with existing slash command behavior.
Review Summary:
- ✅ Bare keywords execute immediately, bypassing queue logic (as intended)
- ✅ Case-sensitive matching is consistent with slash command behavior
- ✅ Both bare keywords and slash commands work even when agent is busy
- ✅ No bugs found in the changed code
The code correctly implements the stated requirements and follows the project's existing patterns.
rumpl
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exit,quit, or:qin the TUI now terminates the session immediately, equivalent to the/exitslash command./quitand/qas slash command aliases for/exit.handleSendMsg).