Skip to content

[Enhancement] Mirror pi-subagents subagent tool details in the web UI (parallel progress, thinking, output) #41

Description

@lifu963

Background

Once Issue 1 is fixed, the parent can run parallel subagents reliably and Tau stays connected — but I would also love to see what subagents are doing inside Tau, not only the parent agent’s main conversation.

In the terminal, pi-subagents’ parallel widget (per-lane progress, currentTool, recent output, expandable results) is very information-dense. If Tau could present that layer too, demos and remote watching would feel complete. I am genuinely excited about Tau evolving in this direction.

Environment

Same as Issue 1; Tau loaded on the parent only (workaround for Issue 1); npm:pi-subagents parallel foreground.

Steps to Reproduce

  1. Start the parent with Tau; browser connection is healthy.
  2. Trigger parallel subagents — e.g. three skill-injected reviewer tasks on the same code snippet.
  3. Compare the subagent parallel (3) tool card in terminal TUI vs Tau in the browser.

Actual Behavior

Terminal TUI Tau Web
Parallel lanes, spinners, currentTool, recent output, etc. Mostly a subagent parallel (3) card
Child thinking and tool chains unfold over time Output area stuck on (running...) or very little text
Structured multi-lane results after completion Hard to see child thinking and full outputs

The subagent tool arguments (e.g. the tasks JSON the user pasted) are nearly unreadable in Tau; the terminal shows the full widget.

Expected Behavior

  • While running: Tau shows per-lane agent status (at minimum: agent name, running/complete, currentTool, recent output summary)
  • Thinking: if child agents emit reasoning, show collapsible thinking blocks (consistent with parent “Show thinking”)
  • After completion: per-lane final output expandable and copyable, closer to terminal renderSubagentResult density

Root Cause Analysis (for reference)

  1. Process boundary: child agents run in separate pi --mode json -p processes; their message_* events are not in the parent process, so Tau cannot mirror child sessions directly.
  2. Data already exists on the parent: pi-subagents aggregates child JSON streams into the parent’s subagent tool tool_execution_update:
    • content[].text: often "(running...)" or a final summary
    • details: mode: parallel, progress[], results[] (including messages, thinking, tool calls) — the terminal TUI renders primarily from this layer
  3. Tau only renders content: formatToolOutput / tool-card.js handle result.content and ignore details.
  4. Rendering model gap: pi-subagents renderCall / renderResult use pi-tui components; they are not automatically serialized for the web.

So the gap is mainly Tau understanding the subagent tool details protocol, not “run another child Tau process.”

Suggested Fix Directions

Phase 1 (recommended) — dedicated web rendering for subagent

When toolName === 'subagent', parse partialResult / result details:

// Illustrative pi-subagents Details shape
details: {
  mode: "parallel" | "single" | "chain" | "management",
  progress?: AgentProgress[],   // status, currentTool, recentOutput, tokens, ...
  results?: SingleResult[],     // messages (incl. thinking), output, ...
  totalSteps?: number,
}
  • mode === "parallel": multi-lane UI (one card/lane per agent)
  • Extract type === "thinking" from results[].messages → reuse existing thinking-block UI
  • On completion, render per-lane text output (or artifact paths)

Optional follow-ups

  • Forward pi-subagents extension events (control / async) over WebSocket
  • Session history: parse toolResult.details when loading from session jsonl

Why pi-subagents Compatibility Matters

pi-subagents is effectively the de facto “multi-agent orchestration” layer for Pi — parallel reviewers, scout → planner → worker, and similar flows are widespread. If Tau natively understands subagent details, one integration benefits the whole subagent user base and aligns well with Tau’s “mirror the terminal session” vision.

I do not expect Tau to pixel-match pi-tui, but parallel subagents should not be a black box while running — that is the step from “very useful” to “indispensable” in my view.

Acceptance Criteria

  • During parallel(3), Tau shows live status for all lanes (not only (running...))
  • Child thinking is viewable in collapsible blocks (respect global Show thinking if possible)
  • Per-lane outputs expandable after completion; ordinary read/bash tool cards unchanged
  • Combined with Issue 1: children do not load Tau; parent connection stays stable

References

  • pi-subagents aggregation: runs/foreground/execution.ts, subagent-executor.ts
  • Tau today: public/app.js formatToolOutput only processes content

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions