[FEATURE] Add Ctrl+Q line stashing functionality (push-line/push-input)
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
When composing a message in Claude Code CLI, I often realize I need to ask Claude something else first before continuing with my original request. Currently, I have to either:
- Delete my partially-typed message and try to remember it later
- Copy the text to a separate note-taking app
- Complete the original request even though it's out of order
This interrupts my workflow and wastes time, especially when crafting longer, complex requests that require information from a previous question.
Proposed Solution
Add support for temporarily stashing the current input line using Ctrl+Q (similar to bash/zsh's \push-line\ functionality).
The workflow would be:
- I'm typing: \
Can you refactor the authentication service to use the new middleware pattern, making sure to update all the tests and add comprehensive error handling\ - I realize I should check the current middleware implementation first
- Press Ctrl+Q → input buffer is cleared and saved to a temporary buffer
- Ask: \
Show me the current middleware implementation\ - After Claude responds, my original refactoring request is automatically reinserted into the prompt, ready to submit
Alternative Solutions
Current workarounds I use:
- Copy/paste to a text editor - requires switching applications and manual tracking
- Using up-arrow history after submitting a placeholder message - creates unnecessary conversation clutter
- Trying to remember complex multi-part requests - error-prone and inefficient
Other CLI tools solve this with similar keybindings (zsh's \push-line\ widget, bash with \push-line\ binding).
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
Example scenario:
- I'm working on a complex refactoring task and start typing a detailed request
- Mid-way through typing, I realize I need to first understand how the current error handling works
- Press Ctrl+Q to stash my partial request
- Ask Claude to show me the error handling implementation
- Review Claude's response
- My original message automatically reappears in the input buffer
- I can now submit or adjust my original request with the new context
This saves time by:
- Eliminating context switching to external note-taking apps
- Preserving complex, carefully-worded requests
- Maintaining a clean conversation history without placeholder messages
Additional Context
This is a standard shell feature that many developers already use daily in their terminal workflows. Bringing this UX pattern to Claude Code would make the CLI feel more natural and efficient for developers who are already familiar with this interaction pattern.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗