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
[Bug]: OpenCode: dismissing a background subagent's question stops it with no report, and its card stays Running #37311
Split out from #37286, whose main case #37300 fixed.
Dismissing a question that a background OpenCode subagent asked stops that subagent for good. It happens through the card's dismiss (runtime-request.respond with decision: "cancel") or a decline. respondToRuntimeRequest in packages/provider-opencode/src/server/v2/adapter.ts (main c5e6b24) then calls client.session.form.cancel without a message. OpenCode treats a cancel without a message as the user dismissing the question, and aborts the asking session's step ("The user dismissed this question", "Step interrupted"). For a background subagent that means it never finishes: no report reaches the parent, and its card in the parent's thread stays Running.
Seen on 0.1.10-nightly 4695 with OpenCode 2.3.0. A parent launches a background subagent that asks a single-choice question after the parent's turn has ended. Dismissing the card leaves the subagent Running, and the parent never gets a report.
Expected: the subagent's question tool fails with a reason and the subagent carries on, then reports. Passing a message to the form cancel (DELETE /api/session/:sessionID/form/:formID?message=…) does that in OpenCode. For a top-level session the current abort may be what you want, so this could apply only to forms from a background call.
Activity