Skip to content

Converge delegation observability: bounded previews for Subagent/Parallel, Team-unique constructs stay Team-only #323

Closed

Description

@JAORMX

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 same EvSubagentTool events, 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)

  1. Collapsed card: show the live current-tool name + heartbeat (currently deliberately suppressed on Subagent cards — render.go:1547; note cmd/mecatui/ui/subagent_test.go:48 asserts the tool name must NOT appear — that assertion would flip).
  2. ctrl+t expanded: replace name-only chips with Team's chip + bounded-preview format (✓ Grep — pattern: foo), plus capped child message-text lines. Reuse clampPreview / maxTeamDetailLen / maxTeamMessageLen.
  3. ctrl+a focus pane: bring renderSubagentFocus and the Parallel group focus view up to renderTeamFocus level.
  4. 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 / InnerKind to SubagentPayload (and ParallelPayload) — the same fields TeamPayload already carries.
  • Populate them in drainChildObserved via the existing clampPreview (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, the EvTeamMember doc-comment, and the delegation-families note in docs/design/IMPLEMENTATION-NOTES.md).
  • engine/api/*.txt will 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.go assertions need updating.

Acceptance criteria

  1. A running Subagent card shows the child's current tool name live (collapsed state).
  2. ctrl+t on a Subagent card shows bounded args/result previews per child tool call and capped child message lines.
  3. Parallel branch views (card + ctrl+a group focus) show the same bounded previews.
  4. No child content crosses into the parent conversation (gauntlet ACP: accept client-provided streaming-HTTP MCP servers #7 holds; previews are client-only).
  5. Team-unique structures (tasks, findings, dispositions, mutating cue, context meter) remain Team-only.
  6. The "args/results hidden" honesty note is replaced with an accurate "bounded previews" framing.
  7. Docs/ADR updated; engine/api/*.txt regenerated with a CHANGELOG entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions