anomalyco / anomalyco/opencode

ESC interrupt not taking effect immediately; queued messages keep firing alternately

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

@kommander is already working on this.

Since Aug 5, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

ESC interrupt not taking effect immediately; queued messages keep firing alternately

The upstream provider for this session has been throwing frequent errors (RequestTimeOut 500, 429 Throttling.AllocationQuota). Your interrupted exceptions are very likely related to the automatic retries/queuing triggered by these upstream errors — if it really is the "error → retry → you hit ESC to interrupt → the queued message triggers again" loop, writing this into the issue would be extremely valuable for the maintainers to pinpoint the problem (the bug is likely in how queued retries are handled during interruption)

Expected: Generation stops immediately on ESC; queued messages wait for explicit send.
Actual:

  • Running generation cannot be interrupted immediately
  • After interrupt, queued messages continue to run
  • Interrupt prompts and messages fire alternately, multiple times
Plugins

No response

OpenCode version

1.18.13

Steps to reproduce

Repro:

  1. Long-running session with multiple queued user messages
  2. Press ESC to interrupt a running generation
  3. esc and input text are trggered alternately or randomly
Screenshot and/or share link

No response

Operating System

Windows 11, PowerShell terminal in opencode TUI

Terminal

window terminal

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.