Skip to content

[Bug]: OpenCode question asked before T3's continuation run starts is never shown and blocks the thread #32430

Closed

Description

@nkoynov

Before submitting

Area

  • apps/server (packages/provider-opencode)

Steps to reproduce

  1. An OpenCode thread is idle; one of its background subagents finishes.
  2. OpenCode wakes the parent session by itself (the subagent report starts a turn) before T3 dispatches its continuation run.
  3. In that turn's first step the model calls question.

Expected behavior

T3 shows the question once its continuation run starts, or cancels the form so the turn can end.

Actual behavior

onAsked in packages/provider-opencode/src/server/v2/adapter.ts gets form.created while requestTurn(sessionID) is undefined and the session isn't unsettled, so it returns without showing or stopping the form. The continuation run starts 30–40 s later, but nothing looks at the open form again (reconcile re-lists forms only after an event-stream reconnect). The form stays pending in OpenCode, the run stays "running", and later subagent reports and the user's own messages wait in OpenCode's inbox behind it.

Seen once on nightly 0.1.7-nightly.20261103.4119: form created 13:53:17 UTC, the subagent report that woke the session at 13:53:01, T3's continuation runs created 13:53:54–13:53:55 (dispatch took 5.9 s, no stall). No pending request in T3 for 3 h 17 min until the form was cancelled through OpenCode's API by hand. The same thread's 9 other questions that week came inside T3 runs and were shown. The code path is unchanged on main (83a3674).

Impact

Major degradation or frequent failure: rare, but the thread is stuck with no visible reason until someone cancels the form outside T3.

Version or commit

0.1.7-nightly.20261103.4119; same code on main 83a3674

Environment

Linux (NixOS), OpenCode 2.2.5 server started by T3, Cursor models through cursor-opencode-provider.

Logs or stack traces

T3's trace has no span mentioning the form id; the run and continuation spans around 13:53 are normal. Possible fix: when a turn starts for a session, list its open forms and permissions (as reconcile does) and show any T3 hasn't shown, or stop asks that arrive with no turn instead of ignoring them.

Found with Claude Opus 5.5 in OpenCode (T3 audit thread).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions