Repository navigation
Description
Before submitting
- I searched open and closed issues and did not find a request for this feature.
- I reviewed this request and removed credentials, tokens, private paths, hostnames, and other sensitive data.
Problem or opportunity
When Orca's Pi status extension (orca-agent-status.ts) is loaded in a Gentle Shell session, the Orca row goes
green ("done") as soon as the parent turn settles, even while several subagent_run background workers are still
running. The AGENTS sidebar shows "3 running", but Orca says the agent is idle, and its completion notification
fires before the work is actually done.
Orca's extension keeps the pane working after the parent turn only while it hears background subagent lifecycle
events on pi.events, using the pi-subagents names:
subagent:async-started/subagent:async-complete(payload{ id, agent?, description? }/{ id })task:subagent:lifecycle({ id, status: started | completed | failed | aborted })subagent:process-terminal({ runId })
Gentle Agents emits none of them. It already solves the same problem for Herdr (#626, herdr:busy), but Orca does
not listen to that channel.
Proposed outcome
Gentle Agents also projects its owned background tasks onto the pi-subagents lifecycle names, next to the Herdr
projection:
- A pure, edge-triggered module (
lib/orca-subagent-lifecycle.ts), likelib/herdr-busy.ts: one
subagent:async-startedper owned unfinished task (id, agent name, label), onesubagent:async-completewhen it
finishes, fails, is cancelled, or leaves the active session. Fails closed on malformed input; never throws. - Recomputed in
refreshHerdrBusy(), so it follows the same ownership filter and summary notifications. - On
session_shutdownit only forgets what it announced; Orca closes out its own roster. - Payloads carry only what the AGENTS sidebar already shows (task id, agent name, label).
With this, Orca keeps the yellow working indicator until the last worker ends, then sends one completion
notification, and lists the subagents in its row.
Alternatives considered
- Emit
herdr:busyonly: Orca does not listen to it. - Speak Orca's hook protocol directly: duplicates an internal Orca protocol; the pi-subagents event names are
the contract Orca's extension already consumes for Pi. - Change Orca to listen to
herdr:busy: possible, but it carries only a count and label, not per-task identity.
Additional context
- Complements feat(launcher): report agent status to Orca when running inside an Orca pane #3233, which makes Gentle Shell load Orca's status extension. In my setup the extension is already
loaded (it owns the pane), so this is the remaining gap for background work. - Tested locally with a patch: about 60 lines of code plus tests (
tests/orca-subagent-lifecycle.test.ts, and an
integration test intests/gentle-agents.test.tsnext to theherdr:busyones: started/complete per task, the
parent settling announces nothing, failure and settle both complete once). Focused tests and the Herdr tests pass;
happy to open a PR.
Activity