anomalyco / anomalyco/opencode

Sending a message while the question-tool prompt is open swallows the message and the session never resumes (v1.18.18)

Open
#46,135 2 comments 1 reaction 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 29, 2026.

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

Description

Summary

When the agent is blocked on an interactive question tool prompt and the user sends a new message (instead of answering the prompt inline), the message is persisted but never processed: the agent loop dies silently, no follow-up turn happens, and there is no abort/error event. From the user's perspective the session "aborts" and never answers.

Repro (v1.18.18, TUI, model glm-5.2 via neuralwatt provider)

  1. Start a session, give the agent a task that ends with a question tool call (e.g. a confirmation prompt before a live config publish).
  2. When the prompt is on screen (message=asking id=que_... questions=1 in the log), type a new message in the input box (e.g. "So?") and submit — do not answer the prompt inline.
  3. Expected: the message either answers the pending question or queues for the next loop iteration, and the agent continues.
  4. Actual: the message lands in the message table (role=user, text part), nothing else happens. No step-finish on the interrupted assistant turn, no reply, no session.aborted/error event, session_inbox stays empty, and the log's last line is the asking line. The session's time_updated equals the user message's timestamp and never advances.

Evidence (SQLite at ~/.local/share/opencode/opencode.db)

  • Last assistant turn parts: step-start, reasoning, text, tool with the question tool in state.status: "running"no step-finish.
  • Following user message: role=user, part type text ("So?"), time_created = session time_updated.
  • event table for the session: only session.created/updated + message.* rows. No abort/cancel/interrupt/error row.
  • session_inbox: empty.
  • log/opencode.log tail: ends at message=asking id=que_... questions=1; nothing after the user message.

Impact

Any interactive question prompt (password/confirmation flows) is a dead-end trap: the user's reply-as-message is silently dropped and the whole run is lost. Workaround today: answer the prompt inline, or resume the session and hope the message becomes a normal turn (it did not in this case).

Environment

  • OpenCode v1.18.18 (TUI), Linux, session id ses_fb2859be9ffejkHLBv6KQb96Ws
  • Happened in a plain interactive session (cwd /home/marcelloc/git/cuplegends)

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.