fix(server): show OpenCode task progress in the composer - #178
Open
rynfar wants to merge 1 commit into
Open
Conversation
OpenCode threads never populated the Tasks tab, the turn plan summary, or the sidebar working line. The adapter dropped OpenCode's `todo.updated` event off the end of its event switch, so no `turn.plan.updated` was ever emitted -- OpenCode was the only provider without plan parity. Separately, `todowrite` matched the `write` branch of tool classification and was filed as a file change, inflating the work log's edit count. Handle `todo.updated` from the v2 SDK, which already reaches the adapter and already passes the parent-session gate, and classify todo tools ahead of the write branch. Cancelled todos are dropped rather than reported completed, and a fingerprint suppresses the duplicate emissions OpenCode sends on every mutation.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
rynfar
added a commit
that referenced
this pull request
Aug 30, 2026
Also note in WATCH-1 that Pylon's own OpenCode task-progress fix is open as #178, so the row stays listed only because upstream #5760 is still open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OpenCode threads never showed task progress. The composer Tasks tab, the turn plan summary, and the sidebar working line were all permanently empty — OpenCode was the only provider in Pylon without plan parity:
turn/plan/updated✅TodoWriteinput + Claude Tasks ✅cursor/update_todos✅PlanUpdated✅Two causes, both in
OpenCodeAdapter.ts:todo.updatedevent that was already arriving at the adapter and already passing the parent-session gate — it just fell off the end of the event switch, which has nodefault. Noturn.plan.updatedwas ever emitted.toToolLifecycleItemTypematchedtodowriteon itswritebranch and classified it asfile_change, so every todo update was filed into the edit tool group and counted toward the edit total. OpenCode threads over-reported file edits.Found while reviewing upstream pingdotgg/t3code#5760, which diagnoses the same bug in T3. That issue is still open with no upstream fix, so this is Pylon's own.
Fix
Handle
todo.updatedand classify todo tools ahead of the write branch. Entirely within the adapter boundary — no contract, decider, projector, or migration changes, sinceturn.plan.updatedalready flows end to end for five other providers.Notes on the choices:
todo.updatedevent, not the tool-call input the upstream issue suggests sniffing. The event is structured, already in the subscribedEventunion, and survives OpenCode changing its tool internals.completed. Pylon's plan contract has no cancelled state, and claiming finished work that was abandoned is worse than omitting it.pending— the SDK typesTodo.statusas a barestring.todo.updatedon every mutation; without this each step transition would write a redundant plan activity. Same approach Grok and Prime already use.Verification
vp test run apps/server/src/provider/Layers/OpenCodeAdapter.test.ts— 84 passed, including 4 new.Each new test was mutation-tested rather than trusted for going green:
todo.updatedcase → the 3 plan tests fail.vp run -F t3 typecheck— 0 errors.vp lintclean on both changed files, verified live with adebuggerprobe rather than inferred from a silent exit 0.Claude Opus 5 in Pylon.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.