---
status: resolved
parent: "[[094-pi-subagent-result-delivery-spec-task|Pi subagent result delivery specification]]"
blocked-by: []
claimed-by: 019fc03c-54fa-7dac-b6a3-3bf7b8f90b96
claimed-at: 2026-08-01T22:10:19-04:00
resolved-at: 2026-08-01T22:24:09-04:00
tags:
  - 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

- [x] `subagent_spawn` and `subagent_batch` can carry explicit labels.
- [x] Ad hoc children get a stable prompt-derived fallback label when no explicit label is provided.
- [x] Status, list, result, notifications, and widget rendering use the same label.
- [x] Existing named-agent, config, context, model, thinking, and tool-profile behavior remains compatible.
- [x] 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.
