Conversation
The Agents panel is built from task.* activities, but the OpenCode adapter classified subagent `task` tool calls as ordinary tool rows and never emitted any task lifecycle events, so the roster stayed empty on every OpenCode thread even though subagents were running. Translate `collab_agent_tool_call` tool parts into task.started/task.updated/ task.completed with timelineBypass, matching the Codex, Claude, and Antigravity adapters. A per-session set keeps exactly one task.started per subagent because OpenCode repeats the part on every streamed update, and the completed row carries the subagent's result so moving it off the timeline drops nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused server-side event-mapping fix that exposes already-running OpenCode subagents through the existing Agents surface without changing execution, schemas, or configuration. The adapter change is isolated and covered by targeted tests for lifecycle routing, deduplication, and results. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughOpenCode task tool events now map to runtime subagent task lifecycle events. The adapter deduplicates repeated start events and includes result or error output in completed task payloads. Tests cover routing, lifecycle transitions, and task outcomes. ChangesOpenCode subagent task events
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to OpenCode subagent tool calls now populate the Agents panel with running and final status while avoiding duplicate entries and raw timeline rows. The covered lifecycle behavior is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
Would love to see this merged! 🙏 OpenCode is my primary harness, which I use alongside Codex through T3 Code, so being able to watch OpenCode subagents at work would be really useful. Thanks for working on this! |
|
Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work. Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look. |
Refs #5952
The problem
The Agents panel is built exclusively from
task.*activities, butOpenCodeAdapternever emitted any. It classified a subagent invocation as an ordinary tool call
(
collab_agent_tool_call), so the roster stayed empty on every OpenCode thread evenwhile subagents were running. Codex, Claude, and Antigravity all translate their
native subagent signals into task lifecycle events; OpenCode was the only enabled
adapter that did not.
The fix
Translate
collab_agent_tool_calltool parts intotask.started/task.updated/task.completedwithtimelineBypass, instead of emitting a timeline tool row.task.started, later updatesbecome
task.updated, andcompleted/errorbecometask.completedwith statuscompleted/failed.produced three
task.startedevents for a single subagent and would have tripledthe roster count. A per-session set of started call ids keeps it to one.
rolefromsubagent_type,descriptionfromdescription, titlefrom the resolved
state.title. NoagentIdis set, soclassifyTaskAgentKindstamps these
agentKind: "agent"and they land in the roster rather than thebackground bucket.
summary,reusing the existing
detailFromToolPart. That is the same text the tool rowpreviously shipped as
detail, so payload size is unchanged and moving thesubagent off the timeline drops nothing.
timelineBypasskeeps the parent timeline to a single spawn CTA rather than a rawtool row, matching how Codex reports child agents.
No contract change: every field used already existed as optional task linkage. No
client change: web and mobile both consume the same
task.*events.Before / after
upstream/main)|
| Agents panel reads "No agents yet", and the subagent shows inline in the timeline as a raw
tasktool row. | Agents panel lists the subagent under DIRECT SPAWNS with its role (explore), duration, and result. The timeline collapses to a single "Ran 1 subagent" CTA. |Both captures use the same prompt, project, and model (OpenCode
GLM-5.3via ClinePass) againstOpenCode 1.18.29; only the server code differs.
Testing
Three tests in
OpenCodeAdapter.test.ts, each watched failing before the fix:roster routing with no timeline leakage, one
task.startedper subagent acrossrepeated updates, and result/failure text on the completed row.
Also verified end to end in a local
vp run devinstance against OpenCode 1.18.29:the subagent now appears in the Agents panel.
Written by Claude Opus 5 (1M context) in Claude Code, driven through T3 Code.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes