anomalyco / anomalyco/opencode

Desktop: pressing Enter on empty input should not send/interrupt

Open
#40,106 2 comments 0 reactions 1 assignee View on GitHub

@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
  1. Start a conversation and ask the agent to perform a task
  2. While the agent is executing, press Enter with the input field empty
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.