Repository navigation
Description
Summary
The three delegation families (subagent.*, team.*, parallel.*) share one lifecycle shape and one redaction chokepoint, but project at different verbosity tiers:
- Team — fuller-but-bounded: live per-member current-tool lanes, capped message text, tool chips with bounded args/result previews (
projectTeamEvent,engine/agent/teamtool.go:547), plus team-unique structures (task board, findings ledger, dispositions). - Subagent — metadata-only: goal line, model line,
subagent · args/results hidden, tool chips with name + ok/error only (drainChildObserved,engine/agent/subagent.go:3075;renderSubagent,cmd/mecatui/ui/render.go:1469). - Parallel — same as Subagent:
branchTool(engine/agent/parallel.go:609) re-tags the sameEvSubagentToolevents, so branches show the same name-only chip traces.
The divergence is deliberate and documented ("Team is intentionally fuller-but-bounded because a crew is meant to be watched" — docs/architecture/domain-model.md:152, engine/session/event.go:146), but in practice it reads as an inconsistency: a single Subagent is less dense than a 4-member team, so the scrollback-noise rationale for hiding its content is weak, and operators who have seen the Team surface expect the same visibility everywhere.
A fresh-context UX review (ux-reviewer agent) assessed this and recommended converging on two tiers instead of three.
Proposal
Tier 1 — common observability (Subagent, Team members, Parallel branches)
- Collapsed card: show the live current-tool name + heartbeat (currently deliberately suppressed on Subagent cards —
render.go:1547; notecmd/mecatui/ui/subagent_test.go:48asserts the tool name must NOT appear — that assertion would flip). - ctrl+t expanded: replace name-only chips with Team's chip + bounded-preview format (
✓ Grep — pattern: foo), plus capped child message-text lines. ReuseclampPreview/maxTeamDetailLen/maxTeamMessageLen. - ctrl+a focus pane: bring
renderSubagentFocusand the Parallel group focus view up torenderTeamFocuslevel. - Honesty note changes from
args/results hidden→bounded previews.
Tier 2 — stays Team-unique
Task board (team.tasks), findings ledger (team.findings), per-round idle/stopped dispositions, mutating cue (✎), per-member context meter. These are genuinely team-shaped structures with no Subagent/Parallel analogue.
Engine surface required
- Add
Text/Detail/InnerKindtoSubagentPayload(andParallelPayload) — the same fieldsTeamPayloadalready carries. - Populate them in
drainChildObservedvia the existingclampPreview(control-byte scrub + rune cap), keep the permission.ask drop discipline. - Parallel reuses the same chokepoint, so it inherits the upgrade via the re-tag closure.
Constraints / notes
- Gauntlet ACP: accept client-provided streaming-HTTP MCP servers #7 unaffected: all projections stay client-only; nothing child-authored enters the parent conversation. This is purely what the client may see.
- This blurs a deliberately documented design line, so it warrants an ADR touch alongside the payload change (
docs/architecture/domain-model.md, theEvTeamMemberdoc-comment, and the delegation-families note indocs/design/IMPLEMENTATION-NOTES.md). engine/api/*.txtwill drift (new payload fields) —task api:update+ CHANGELOG note (Added = minor).- TUI: the renderers already know how to draw all of this from the Team side — it's wiring, not a new UX surface. Golden tests +
subagent_test.goassertions need updating.
Acceptance criteria
- A running Subagent card shows the child's current tool name live (collapsed state).
- ctrl+t on a Subagent card shows bounded args/result previews per child tool call and capped child message lines.
- Parallel branch views (card + ctrl+a group focus) show the same bounded previews.
- No child content crosses into the parent conversation (gauntlet ACP: accept client-provided streaming-HTTP MCP servers #7 holds; previews are client-only).
- Team-unique structures (tasks, findings, dispositions, mutating cue, context meter) remain Team-only.
- The "args/results hidden" honesty note is replaced with an accurate "bounded previews" framing.
- Docs/ADR updated;
engine/api/*.txtregenerated with a CHANGELOG entry.
Activity
docs(acceptance): delegation observability convergence plan + ADR 0079
Converge delegation observability: bounded previews for Subagent/Para…