Repository navigation
Description
Problem or use case
When Pi runs in an Orca terminal pane, the subagents a Pi extension reports appear in Orca's agent status. When the same Pi runs as an Orca native chat session (Orca launches pi --mode rpc through its provider supervisor), no subagents appear at all, even while several are running. Each subagent launch shows only as a plain tool-call row.
Same machine, same Pi install, same extensions in both cases. In one native chat session, an extension started five subagents, all visible in Pi's own session records, and Orca listed none of them. The same extension's subagents do show in a terminal pane.
Environment: Orca 1.4.245 (macOS, Apple silicon), Pi 1.1.0 (@earendil-works/pi-coding-agent), and the Orca-managed extension ~/.pi/agent/extensions/orca-agent-status.ts.
Why it happens (from reading the 1.4.245 bundle):
- The roster is collected by Orca's own Pi extension.
orca-agent-status.tslistens on Pi's extension event bus fortask:subagent:lifecycle,subagent:async-started,subagent:async-completeandsubagent:process-terminal, and adds asubagentsarray to each status post. It posts to the agent hook endpoint (ORCA_AGENT_HOOK_ENDPOINT, orORCA_AGENT_HOOK_PORTandORCA_AGENT_HOOK_TOKEN), andpostOncereturns without posting unless a port, a token andORCA_PANE_KEYare all set. - Native chat does not give Pi that endpoint. The hook endpoint variables are set in the terminal (PTY) launch path. None of the structured agent session modules under
app.asar.unpacked/out/mentionORCA_AGENT_HOOK, and a native chat session's environment has noORCA_AGENT_HOOK_*variables. - The Pi chat adapter has no subagent input. In
out/main/chunks/structured-agent-session-host-assembly-*.js, the Pi adapter's RPC event switch handlesresponse,agent_start,message_*,tool_execution_*,turn_end,agent_end,agent_settled, the compaction events and the auto-retry events. Every Pi tool event becomes a generictool-callblock. Native chat builds its subagent roster fromsubagentandsubagent-groupblocks, which the Codex and Claude adapters produce (for example fromspawn_agent); the Pi adapter never produces one. - Pi cannot forward the bus event itself. Pi's
pi.eventsis extension-to-extension only (Pi docs,extensions.md). In RPC mode, the only extension output that reaches stdout isextension_ui_request(notify,setStatus,setWidget,setTitleand the dialogs; Pi docs,rpc-extension-ui.md), and the Pi adapter's switch has noextension_ui_requestcase.
Reproduce:
-
Save this as
~/.pi/agent/extensions/demo-subagent.ts. It reports one subagent when a turn starts and ends it 30 seconds later:export default function (pi) { let n = 0; pi.on("agent_start", () => { const id = `demo-${++n}`; pi.events.emit("task:subagent:lifecycle", { id, agent: "worker", description: "Demo subagent", status: "started" }); setTimeout(() => pi.events.emit("task:subagent:lifecycle", { id, agent: "worker", description: "Demo subagent", status: "completed" }), 30_000); }); }
-
In an Orca terminal pane, run
piand send any prompt. "Demo subagent" should appear in Orca's agent status for about 30 seconds. -
Start a Pi native chat session in Orca and send any prompt. No subagent appears.
I have not run this exact demo extension. The event shape is the one our own extension emits, and that extension behaves as described in both modes.
Proposed solution
Either would work; the first reuses what Orca already ships.
- Give native chat Pi sessions the agent hook endpoint (port, token and a pane key the extension can send back), and fold the
subagentsarray from those posts into the native chat subagent roster. No Pi change and no extension change are needed. - Handle
extension_ui_requestin the Pi chat adapter. The Orca-managed extension could then report the roster in RPC mode through a fire-and-forget call (for examplesetWidgetwith an Orca-specific key), and the adapter would map it tosubagentblocks.
Alternatives or additional context
- Workaround today: run Pi in a terminal pane instead of native chat. Subagents then show as expected.
- Related: [Feature]: Support @tintinweb/pi-subagents events on the Pi hook route #28894 (pi-subagents events on the Pi hook route), Pi-family panes: show child rows (subagents, watchers) through the hook lane #22868 (Pi-family child rows through the hook lane), Native chat for third-party agents: pi (pi-coding-agent) adapter / public session-host contract #21558 (the Pi native chat adapter).
- Related observation, untested: the Pi adapter ignores all
extension_ui_requestevents, including the dialog methods (select,confirm,input,editor). Pi blocks until it receives anextension_ui_responsefor each of those (Pi docs,rpc-extension-ui.md). We have not tested a Pi extension dialog in native chat, but from the adapter code nothing answers it.
Activity
Fiv5 commentedon Nov 13, 2026
Same issue here.Hope Pi can also be treated as a first-class citizen, just like claude code/codex.