Skip to content

fix(opencode): Let OpenCode 2 background wake-ups pass continuation admission - #51

Closed
mwolson wants to merge 1 commit into
contrib/ctm/oc2-9-textgen-mcp-restartfrom
contrib/ctm/opencode2-continuation-ownership
Closed

mwolson wants to merge 1 commit into
contrib/ctm/oc2-9-textgen-mcp-restartfrom
contrib/ctm/opencode2-continuation-ownership

Conversation

@mwolson

@mwolson mwolson commented Oct 1, 2026

Copy link
Copy Markdown
Owner

What Changed

The adapter now reports held output for a thread while it holds a wake for that thread's session. Delivering the wake, a Stop or a reconnect that drops it ends that report with it. A continuation turn replays output that already ran and sends no model selection, so its start is no longer taken as acknowledging one.

Why

When a background subagent finishes, OpenCode 2 runs the parent's reply on its own and T3 holds that output for a continuation turn. A provider continuation is only admitted while the provider shows it still holds undelivered output for the thread, so it cannot start on a session or selection that never produced that output. The OpenCode 2 adapter never reported the output it holds, so every background wake-up was refused and the reply never reached the thread.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

…dmission

When a background subagent finishes, OpenCode 2 runs the parent's reply on
its own and T3 holds that output for a continuation turn. A provider
continuation is only admitted while the provider shows it still holds
undelivered output for the thread, so it cannot start on a session or
selection that never produced that output. The OpenCode 2 adapter never
reported the output it holds, so every background wake-up was refused and
the reply never reached the thread.

The adapter now reports held output for a thread while it holds a wake for
that thread's session. Delivering the wake, a Stop or a reconnect that
drops it ends that report with it. A continuation turn replays output that
already ran and sends no model selection, so its start is no longer taken
as acknowledging one.
@mwolson
mwolson force-pushed the contrib/ctm/opencode2-continuation-ownership branch from 2676d08 to f8d446c Compare October 1, 2026 14:13
@mwolson
mwolson force-pushed the contrib/ctm/oc2-9-textgen-mcp-restart branch from c9c1391 to eae670d Compare October 1, 2026 14:13
@mwolson
mwolson removed this pull request from stack #53 October 1, 2026 14:13
@mwolson
mwolson added this pull request to stack #55 October 1, 2026 14:13
@mwolson
mwolson removed this pull request from stack #55 October 3, 2026 20:28
@mwolson

mwolson commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

Closing: the adapter report these tests cover is part of #11 execution-selection-admission, so the tests moved into that layer and this test-only layer was dropped at the 2026-10-03 refresh.

@mwolson mwolson closed this Oct 3, 2026
@mwolson
mwolson deleted the contrib/ctm/opencode2-continuation-ownership branch October 3, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant