Repository navigation
Description
Summary
When the OMP provider (omp --mode rpc) spawns subagents with its built-in task tool, the thread shows the call as one generic tool row. No subagent cards appear and no child work is listed, although the Pi adapter it reuses already emits subagent.updated events for pi-subagents.
Why it happens
Checked against m3code ed18486 and oh-my-pi 0b04850.
packages/provider-ompreuses the Pi adapter (createPiAdapterV2DriverwithOMP_FLAVOR). The adapter projects subagents only whentoolName === "subagent"(packages/provider-pi/src/server/adapter.ts:1539), which is the pi-subagents extension's tool name. OMP's tool is namedtask(oh-my-pi/packages/coding-agent/src/task/index.ts:674), so it falls through to the genericdynamic_toolitem.- Changing the name check alone is not enough, because OMP's
TaskToolDetails(src/task/task-details.ts:420) differs from the pi-subagents shape in three ways:- Result text: a successful subagent's text is in
SingleResult.output.piSubagentOutputreads onlymessages(anderrorMessage/stderron failure), so finished cards would show no result. - Live progress: while a call runs, its updates carry
details.progress[](AgentProgress), andresults[]stays empty until subagents finish.emitSubagentTasksreads onlyresults, so running subagents never appear. - Background runs: these report
details.async = { state, jobId, type: "task" }. The adapter tracks onlydetails.asyncIdplus thesubagent-asyncwidget, so background OMP tasks are not tracked.
- Result text: a successful subagent's text is in
- On the ACP route (OMP as an ACP agent),
provider-acp-registrygives OMP onlyextractElicitationForm. There is noextractSubagentUpdateas there is for Claude, Devin and Copilot, sotaskcalls are plain tool calls there too.
Proposal
- In the Pi adapter, treat
tasklikesubagent. Gate on the flavor (OMP only) or on the details shape, so a Pi user's customtasktool is not misread. - Map OMP's
SingleResultfields:outputfor the result text,exitCodefor the status, andagent,taskanddescription/assignmentfor the title. - Build running cards from
details.progress[]ontool_execution_update. - Track background runs by
details.async.jobIduntil they settle, and keep the existingbackground_work.updatedpending signal. - Add a test that replays a recorded OMP
taskstart, update and end sequence: foreground, parallel and async.
Optional follow-up: OMP keeps a session per subagent (SessionObserverRegistry, registerPersistedSubagents). If RPC exposes those session ids, set exposesSubagentThreadIds and pass childThreadId, so each subagent opens as its own child thread as ACP-Claude's do.
Expected result
An OMP turn that calls task shows one subagent card per spawned agent. Each card shows the agent name, the task, a live status (running, completed, failed or interrupted), its progress and its final output, and background tasks keep updating after the coordinator's turn ends.
Activity
MiaAI-Lab commentedon Nov 26, 2026
Thanks for the detailed write-up — the analysis matches the code: on
main,packages/provider-pi/src/server/adapter.tsprojects subagent cards only fortoolName === "subagent", so OMP'staskcalls fall through to a generic tool row. #31 implements this proposal and is in review; its remaining blocker is that backgroundtaskruns are marked interrupted when omp's turn settles instead of staying tracked until they finish. Leaving this open until #31 lands.(Review notes prepared with Claude Code on behalf of the maintainer.)