Files
ai-artifacts/projects/dotfiles/096-pi-subagent-labeled-work-items-implementation.md

2.1 KiB

status, parent, blocked-by, claimed-by, claimed-at, resolved-at, tags
status parent blocked-by claimed-by claimed-at resolved-at tags
resolved 094-pi-subagent-result-delivery-spec-task
019fc03c-54fa-7dac-b6a3-3bf7b8f90b96 2026-08-01T22:10:19-04:00 2026-08-01T22:24:09-04:00
ticket/implementation

Pi subagent labeled work items

Question

Implement human-readable subagent work labels throughout spawn, status, result, notifications, and widget surfaces.

What to build

Subagent spawn and batch spawning should accept or derive a stable human-readable label for each child. Explicit labels from callers should win. Structured callers should be able to pass labels without adding workflow-specific semantics to the generic subagent layer. Ad hoc children should receive a useful prompt-derived fallback label instead of only ad-hoc <id>. The selected label should be stored once on the child record and reused consistently anywhere that child is shown or returned.

Acceptance criteria

  • subagent_spawn and subagent_batch can carry explicit labels.
  • Ad hoc children get a stable prompt-derived fallback label when no explicit label is provided.
  • Status, list, result, notifications, and widget rendering use the same label.
  • Existing named-agent, config, context, model, thinking, and tool-profile behavior remains compatible.
  • Tests cover explicit labels and fallback labels.

Implementation Notes

Keep labels generic. Do not encode Wayfinder-specific reconciliation behavior in the subagent layer.

Implemented on branch subagent-labels in commit c5828e0 feat(pi): label subagent work items. Verification passed with nix shell nixpkgs#nodejs_24 nixpkgs#tsx -c tsx --test modules/agents/pi/extensions/subagents/supervisor.test.ts modules/agents/pi/extensions/subagents/runner.test.ts modules/agents/pi/extensions/subagents/config.test.ts. Review found no blocking findings after follow-up fixes. The remaining non-blocking evidence limitation is that index.ts tool and command handlers are still covered indirectly through config, supervisor, runner, and notification-format tests rather than a fake Pi extension integration test.