A subagent's tab reads "Subagent Agent": opencode 2 moved the agent's name to info.agent #345

Closed
opened 2026-10-30 13:29:46 -04:00 by cmoriarty · 1 comment
Owner

What happens
In run 160 the Subagents panel's tab for the Visual check's browser subagent reads "▣ Subagent Agent running", and so does the delegation row. opencode 2 no longer titles a child session <task> (@browser subagent), and its session.updated payload carries the agent as info.agent, which onChildStarted doesn't read (ui/src/lib/format.ts; it reads a top-level agent). So the agent falls back to the word subagent, and delegateFacts adds "Agent". The subagent tool part has no metadata.sessionId while running, so onTaskCall never corrects it.

Fix
Read info.agent in onChildStarted. When no agent is known, title the row "Subagent", never "Subagent Agent". Add a format test on an opencode 2 oc.child.started payload.

Done when
Run 160's subagent tabs and rows read "Browser Agent", and an unknown agent reads "Subagent".

**What happens** In run 160 the Subagents panel's tab for the Visual check's browser subagent reads "▣ Subagent Agent running", and so does the delegation row. opencode 2 no longer titles a child session `<task> (@browser subagent)`, and its `session.updated` payload carries the agent as `info.agent`, which `onChildStarted` doesn't read (`ui/src/lib/format.ts`; it reads a top-level `agent`). So the agent falls back to the word `subagent`, and `delegateFacts` adds "Agent". The `subagent` tool part has no `metadata.sessionId` while running, so `onTaskCall` never corrects it. **Fix** Read `info.agent` in `onChildStarted`. When no agent is known, title the row "Subagent", never "Subagent Agent". Add a format test on an opencode 2 `oc.child.started` payload. **Done when** Run 160's subagent tabs and rows read "Browser Agent", and an unknown agent reads "Subagent".
Author
Owner

Done in batch B, merged as #355 (91f4b85f), and live on production: Braid reports commit c00c62f, which includes it. It was checked with the repo's tests and sims before the merge. A live check on vLLM is still to come: trogdor is off the network. Closed at the owner's request.

Done in batch B, merged as #355 (`91f4b85f`), and live on production: Braid reports commit `c00c62f`, which includes it. It was checked with the repo's tests and sims before the merge. A live check on vLLM is still to come: trogdor is off the network. Closed at the owner's request.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid#345
No description provided.