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
3 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Duplicate of #50658 — same root cause (silent compaction restores unsent input buffer from session snapshot). Closing and upvoting the existing issue.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.