agent pane: progress and stop for a running Claude subagent or workflow (cx-liswe)
Summary
A running Claude subagent or workflow row in the agent pane now shows what it is doing and what it has spent, and has a stop button. This is the web half of the workflows work; the acpmux half landed in #20573. Bead cx-liswe.
- Progress line. A running row's second line shows the current action (a workflow's step, otherwise the agent's progress summary or last tool), then its tokens, tool uses and, for a workflow, agents done of started. It reads the
subagent_progressfields #20573 adds to the subagent model. - Stop. A running row has a stop button (
.cv-subagent__stop) that sends_acpmux/subagent_stop. Only Claude chats get one, since only Claude's agents stop on their own. The row ends as cancelled when Claude'stask_notificationarrives.- The button is off while Claude has the request, and stays off after Claude takes it, until the subagent ends.
- If acpmux or Claude refuses, or Claude doesn't answer within 10 s, it turns red and reads "Couldn’t stop ". It can be tried again.
- Clicking it never opens the row.
- Strings.
subagents.stop,subagents.stopFailed,subagents.tokens,subagents.toolUsesandsubagents.workflowAgents, in all 21 locales.
The Background tasks pane (one list of running agents, workflows and shells) builds on this row and comes in a later PR; the shells half waits for the process registry (#20550).
Testing
test/subagent-progress.test.tsx:- "a running workflow and a background agent show what they do and what they have spent": red at 5588d410 (test commit), green on this head.
- "a running subagent has a stop button": red at 7d699d46 (test commit), green on this head.
- "stopping a subagent leaves its row closed; a refused stop says so and can be tried again": red at 1ea38b6b (1 fail: the button stayed enabled while Claude had the request), green at 6264d87e (3 pass). Both runs were
bun test test/subagent-progress.test.tsx.
- Review: a review subagent found no blockers. I fixed both should-fixes in 6264d87e: a failed stop is no longer silent, and the test now covers the stop click and a refusal. I also fixed its comment nits.
- Strings check (
gen-strings.mjs --check) passes; the catalog diff is additions only. - Captures: the PR's gallery render (
agent-pane.subagents, base vs head).
Changelog
- Added: a running Claude subagent or workflow shows its current step and spend in the agent pane, with a button to stop it.
Showcase
Real cmux NEXT DEV builds on a capture slot (base 8ae8e3b1, head 61e45745, Mac builder), a live Claude chat that started a background Explore agent and a Claude Workflow. Before: the open group shows only the action and time. After: each running row shows its progress line and a stop button.
The stop click was refused in the real app. The native host answers _acpmux/subagent_stop with transport.method_refused ("Refused by the cmux host") because the method is missing from the allowlist in AcpmuxPaneMethods.swift. So the icon turns red at once and the agent keeps running (stills 5-6 and the clip). The dim "stopping" state and the cancelled end could not be captured.







Full quality:
🤖 Generated with Claude Code