OpenCode provider: subagents spawned via delegation never appear in the Agents pane (no task.* events)
What happened
When using T3 Code with an OpenCode-based thread, subagents spawned via delegation (the native task/subagent tool) never appear in the Agents pane. They only show up as a "Subagent task" row in the chat timeline. In contrast, Claude Code and Codex threads show live subagent entries in the Agents pane.
Why
The Agents pane is built purely from runtime task.started / task.progress / task.completed events bearing parentAgentId/task linkage:
- Claude adapter: emits
task_started/task_progress/task_notificationsystem messages →task.*events ✅ - Codex adapter:
collabAgent/*notifications →mapCollabAgentEvent→task.*events ✅ - Antigravity (ACP) adapter: promotes
ToolCallUpdatedto subagenttask.*events ✅ - OpenCode adapter: has no equivalent path ❌. In
message.part.updatedhandling, tool parts are classified bytoToolLifecycleItemType()intocollab_agent_tool_callchat items only. Child opencode sessions (session.createdwithparentID) are tracked just for permission/question routing (relatedSessionIds), never promoted totask.*events.
All the data needed is already available at the emit site: part.state.metadata.sessionId (child session), part.state.input.subagent_type (agent name), part.state.input.description, part.callID — and the tool-part handler shares the same closure as the adapter's runtime emit.
Suggested fix
In the OpenCode adapter's tool-part handler, when the tool is a delegation tool (task/subagent) and part.state.metadata.sessionId exists, emit alongside the item event (deduped per callID):
task.startedonce:{ taskId: sessionId, taskType: "subagent", title: input.description ?? state.title, role: input.subagent_type, toolUseId: callID, model? }task.progresson running updates:{ taskId, description }task.completedon completed/error:{ taskId, status: "completed" | "failed", summary }
The shared fold layer (runtimeEventToActivities / taskLinkageActivityFields) and the UI already render these correctly for any provider — no UI changes needed.
I have a working prototype patch against the 0.0.41-nightly.20260914 server bundle (OpenCode adapter, insertion right after const itemType = toToolLifecycleItemType(part.tool);) that restores full Agents-pane parity; happy to share or open a PR.
Environment
- Version: 0.0.41-nightly.20260914.1687 (also verified absent in 0.0.41-nightly.20260915.1752)
- Provider: OpenCode (with the oh-my-opencode-slim orchestration plugin, though the issue reproduces with native delegation too)
Closing as a duplicate of #5952. Same report: OpenCode native Task/subagent child sessions never appear in the Agents panel because OpenCodeAdapter does not emit task.* activities (only collab_agent_tool_call chat items).
Track the remaining work in #5952 (open fix PRs: #7393, #10858).
Duplicate of #5952.