anomalyco / anomalyco/opencode

Queued prompt resolves with the stopped turn's message instead of its own reply

Open
#48,347 0 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Sep 10, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

A prompt submitted while another prompt's turn is active can resolve with the earlier turn's message instead of its own reply — typically a tool call with no text parts.

Plugins

None

OpenCode version

dev @ b3f1a96c6d

Steps to reproduce
  1. Submit prompt A; its turn calls the question tool and hangs waiting for an answer (same happens with a denied tool).
  2. Submit prompt B while A's run is active. B's user message is persisted and B waits on the active run.
  3. Reject the question (POST /question/:id/reject) — the processor sets ctx.blocked and the turn ends with "stop".

Expected: B gets its own assistant reply.
Actual: the run exits and resolves every waiter with its final message — A's tool-only message, no text parts.

Screenshot and/or share link

N/A (reproduced via API with a regression test)

Operating System

macOS 26.4.1

Terminal

N/A — server-side, reproduced via HTTP API

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.