Context compaction auto-submits unfinished user message without Enter
Description
During context compaction, an in-progress user message was automatically submitted and executed without the user pressing Enter. The user was mid-message when compaction triggered, and the partial/complete message was sent as if the user had confirmed it.
Steps to Reproduce
- Have a long conversation that approaches context limits
- Begin typing a message but do not press Enter
- Context compaction triggers
- Message is submitted automatically without user confirmation
Expected Behavior
Context compaction should never submit or execute a pending user message. Any in-progress input should remain in the input buffer, untouched, after compaction completes.
Actual Behavior
The unfinished message was submitted as a command and executed without the user pressing Enter.
Impact
This can cause unintended actions — in this case, infrastructure changes were applied to a live AWS environment based on a message the user had not yet chosen to send. The outcome happened to be acceptable, but this behavior is unsafe in general.
Environment
- Platform: macOS (darwin 25.3.0)
- Shell: zsh
- Model: claude-sonnet-4-6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗