Autocomplete suggestion submitted when pasting image + enter
Bug Description
When pasting an image into the CLI input and pressing Enter, any autocomplete suggestion in the input box gets submitted along with the image, even though the user never intentionally typed or accepted that suggestion.
Steps to Reproduce
- Start typing or have an autocomplete suggestion appear in the input box (e.g., "merge it")
- Paste an image (e.g., a screenshot)
- Press Enter to submit the image
Expected Behavior
Only the image should be submitted. The autocomplete suggestion should be cleared or ignored.
Actual Behavior
The autocomplete suggestion text is submitted along with the image, causing Claude to interpret it as a user command.
Impact
High severity - This can lead to unintended destructive actions. In our case, "merge it" was accidentally submitted, causing a PR to be merged without explicit user intent. Other dangerous suggestions like "force push", "delete", or "reset --hard" could be catastrophically executed.
Environment
- macOS
- Claude Code CLI
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗