You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sending a message while the question-tool prompt is open swallows the message and the session never resumes (v1.18.18) #46135
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)
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).
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.
Expected: the message either answers the pending question or queues for the next loop iteration, and the agent continues.
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
This issue might be a duplicate of existing issues. Please check:
Queued messages are silently dropped when a turn is interrupted #40955: Queued messages are silently dropped when a turn is interrupted — same symptom (user message persisted but session never processes it, no reply, no abort event), just triggered via Esc/abort rather than via a question-tool prompt. The root cause described there (loop not restarted after cancellation) may cover this case too.
Attribution update — confirmed opencode-side, not the driver/UI layer. The session was driven through Tether (a web PTY client), and its journal shows the full picture:
14:26:29 — an earlier interrupt was handled cleanly: turn.error "Aborted" -> outcome: cancelled (durationMs 128168), followed by a normal 7ms turn. The ordinary abort/interrupt path works.
14:28:25 — the user's message ("So?") was submitted; Tether logged turn.start for it (the engine was handed the message).
After 14:28:25 — no turn.end ever fires. The opencode serve process for this session (started 14:24) is still alive and hung >30 min later (verified via ps). It is not a crash and not a client kill — the process is blocked.
The message exists in opencode's own SQLite message table with a text part and no parentID (submitted as a fresh user message, not as an inline answer to the prompt).
So the engine accepted the message (persisted it) but the session loop never picked it up: the loop is blocked awaiting the question tool's resolution and a concurrently-arriving user message neither resolves it nor queues a follow-up turn. Repro: run a task that ends in a question tool call, then submit a new message (don't answer the prompt inline) -> engine hangs forever, message unprocessed.
Same with session.promptAsync from the SDK: queued messages hang forever while a question is pending.
New user messages should resolve the pending question: either send the text as a custom answer, or dismiss the question and continue the loop so the message runs.
Activity
github-actions commentedon Aug 29, 2026
This issue might be a duplicate of existing issues. Please check:
TheMrClaus commentedon Aug 29, 2026
Attribution update — confirmed opencode-side, not the driver/UI layer. The session was driven through Tether (a web PTY client), and its journal shows the full picture:
14:26:29— an earlier interrupt was handled cleanly:turn.error "Aborted"->outcome: cancelled(durationMs 128168), followed by a normal 7ms turn. The ordinary abort/interrupt path works.14:28:25— the user's message ("So?") was submitted; Tether loggedturn.startfor it (the engine was handed the message).14:28:25— noturn.endever fires. The opencodeserveprocess for this session (started 14:24) is still alive and hung >30 min later (verified via ps). It is not a crash and not a client kill — the process is blocked.messagetable with atextpart and no parentID (submitted as a fresh user message, not as an inline answer to the prompt).So the engine accepted the message (persisted it) but the session loop never picked it up: the loop is blocked awaiting the
questiontool's resolution and a concurrently-arriving user message neither resolves it nor queues a follow-up turn. Repro: run a task that ends in aquestiontool call, then submit a new message (don't answer the prompt inline) -> engine hangs forever, message unprocessed.remorses commentedon Oct 7, 2026
Same with
session.promptAsyncfrom the SDK: queued messages hang forever while a question is pending.New user messages should resolve the pending question: either send the text as a custom answer, or dismiss the question and continue the loop so the message runs.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊