[FEATURE] `:q` should not exit when there is a running session (partial vim implementation)

Status Open
Reported on v2.1.283
Maintainer reply None cached
Activity 0 comments · opened Sep 26, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Claude seems to support the :q syntax in the prompt box. However, its implementation is partial in regard to where it comes from. Indeed, typing :q in a running session will just interrupt the ongoing work and exit the session.

Proposed Solution

In vi) (1976), typing :q when there are pending changes will notify the user that they shall either save their changes to disk, or add an exclamation mark to the command (:q!) to force exit.
I suggest to do the same: only quit if there is no ongoing work, or ask the user to add !.

Alternative Solutions

I cannot think of an alternative solution since this design comes from vi and it's been working this way for the past 50 years.
Another solution would be not to mimic the behaviour at all, and remove the support of :q.
Meanwhile, the half implementation is kind of rude in this era where writing code is so cheap.

Priority

Low - Nice to have

Feature Category

Interactive mode (TUI)

Use Case Example

  1. Start a long task
  2. Type in :q while it's still running (by mistake hopefully!)
  3. Lose the ongoing work (running scripts, whatever) and be sad

Additional Context

Claude version: 2.1.283 (Claude Code)

vi handles this very well:

<img width="392" height="241" alt="Image" src="https://github.com/user-attachments/assets/fb4aa078-75f7-449b-8c9a-1fb068e10b1b" />

View original on GitHub ↗