anthropics / anthropics/claude-code
[Feature Request] Add ability to interrupt and inject prompts during agent execution with keyboard shortcuts
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**Feature Description**
implement the ability of instantly injecting a prompt in the running agent: i shall be able to press ctrl+enter in the text field when the agent is running and decide whether to queue the message until it finishes or inject it immediately in the next turn. this feature can be extremely useful if the working agent is drifting, or if some extra context has appeared while the agent is working, and such extra context is beneficial for the agent to finish the task as intended.
i think this feature is already implemented in some other agents apps like antigravity gui.
**Environment Info**
- Platform: darwin
- Terminal: tmux
- Version: 2.1.267
- Feedback ID: e02c1896-c0b5-44ee-838c-2ad296e6c5b8
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing terminal input handling and the running-agent execution flow. Clarify how Ctrl+Enter should distinguish queueing from immediate injection, including behavior while a turn is active. Done means both choices work without losing prompt text and are covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100