feat(agent-pane): show fold-backed workflow summaries in Labs

Merged
TE
12d ago
+552-66

Leo, 2026-10-24, on dynamic workflows: "presumably we can, like, expand this a lot more. I mean, like we already did some part of this, right? I didn't really see or test it out yet." This is the base of that work: the Labs workflow summaries, reading the fold data that #24789 and #24818 (both landed) produce. The workflow card and the Session Info panel build on it in follow-up PRs.

Gallery: agent-pane.summary-card/workflow-labs

Adopted by tt-workflows (pr-owner claim; the opening Codex lane on big-red is gone). It's rebuilt as its one UI commit on current feat-cmux-next, since the old integration base carried copies of #24789 and #24818, which have landed since.

What changed

Behind Labs (workflowLabs, off by default), the chat summary column shows one row per workflow subagent node in the subagent fold, instead of the old single snapshot.workflow that acpmux never sent.

  • Rows. Each row shows its title, state, progress (done/started), elapsed time and tokens. Opened, it lists phases and each phase's agents.
  • Keys. A row is keyed by the workflow node's id plus the agent's index, never by runId. A resumed run is a new node with the same runId, and shows "resumed from".
  • Tokens. Live tokens, plus a projection from finished agents' average.
  • States. Paused, cancelled and unknown are shown as such. A phase's state is "unknown" until a follow-up derives it from its agents.
  • Stop uses the existing stop_task path.
  • Resume / Run again. Resume refuses visibly, because the pane has no args to resume with: acpmux sends only a digest of them (#24930). Run again fills the composer with a visible message.
  • Warnings. The capacity warning appears only with an explicit daemon feed, and no live dollar figure is shown.

No change outside Labs.

Risk: low. It's Labs-only and reads data the fold already keeps.

Testing

  • bun test src/agent-session/acpmux/summary/foldWorkflows.test.ts src/agent-session/acpmux/subagents/workflowAgents.test.ts test/summary-background-work.test.tsx: all new tests pass:

    • same runId and index collisions;
    • token reference reuse;
    • state and phase gaps;
    • the capacity signal cases;
    • idle;
    • visible resume refusal and Run again.

    One test in that file, the timer in "mixed running, completed and failed task cards", fails the same way on base with this host's bun.

  • vp fmt --check on the changed files is clean, and tsc --noEmit reports nothing in them.

Agent session: huge-blue

šŸ¤– Generated with Claude Code