Open
Description
Is there an existing issue for the same bug? (If one exists, thumbs up or comment on the issue instead).
- I have checked the existing issues.
Describe the bug and reproduction steps
The CLI currently doesn't handle Ctrl+C
properly in some states. Pressing it can cause the CLI to exit immediately without showing the expected exit prompt.
In the CLI, Ctrl+C
is currently handled in three different ways:
- By the message input prompt (when active)
- By the agent pause listener (active only when the agent is in the
running
state) - In all other cases, a fallback signal handler is triggered, which causes the CLI to exit without confirmation
This fallback behavior can cause the CLI to terminate unexpectedly if Ctrl+C
is pressed at the wrong time - for example, right after submitting a message but before the agent has started working.
Reproduction steps
- Start the CLI
- Type a message and press Enter
- Press
Ctrl+C
immediately after submitting the message (before "Agent is running" appears) - The CLI exits without showing the exit prompt (with a
Session was interrupted: interrupted
message)
OpenHands Installation
CLI
OpenHands Version
0.48
Model Name
No response
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response