anomalyco / anomalyco/opencode
Desktop: pressing Enter on empty input should not send/interrupt
@Hona is already working on this.
Since Aug 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In the OpenCode desktop app (Windows), pressing the Enter key while the input field is empty sends the message. This becomes a problem when the agent is executing a task -- accidentally pressing Enter will interrupt the ongoing task.
Steps to reproduce
- Start a conversation and ask the agent to perform a task
- While the agent is executing, press Enter with the input field empty
- The empty message is sent, which interrupts the current task
Expected behavior
When the input field is empty, pressing Enter should be a no-op. Messages should only be sent when there is actual content in the input field.
Additional context
The desktop prompt shortcuts are documented as "currently not configurable via opencode.json", so there is no workaround via configuration files. This needs to be fixed in the application logic itself.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.