Skip to content

Agent chat: a run of tool calls between messages collapses to one quiet line - #24443

Merged
teamleaderleo merged 11 commits into
feat-cmux-nextfrom
tp/tool-run-summary
Oct 23, 2026
Merged

teamleaderleo merged 11 commits into
feat-cmux-nextfrom
tp/tool-run-summary

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Leo-ask: ask-ef75b49339

Leo, 2026-10-22, on Codex's transcript: "this is pretty good ui: … the collapsing i mean"

A run of tool calls between messages now collapses to one quiet summary row, including edits: “Edited 2 files, read 2 files, ran 2 commands.” Click it to expand the existing tool rows. The line names kinds of work in first-occurrence order; edits use the pencil, otherwise the most frequent kind supplies the glyph.

Running calls remain on the live line. Background calls spin the summary glyph, failures are counted, coordination cards remain visible, and file changes awaiting permission stay expanded. The ended turn’s edited-files card remains available.

The app dispatches shaped tool runs to the tool-row renderer, including runs with edits, and estimates their collapsed height as one line. A regression caught the previous dispatch to the edited-files card, which hid the summary in the real gallery despite isolated component tests passing.

Gallery and reference

Reference: Codex codex-collapsed-tools.png supplied with Leo’s ask; reviewed the private cmux-design-references README and Claude/Codex live notes.

Four gallery looks are retained: collapsed-run (selected default: main-kind glyph and settled-row color), collapsed-run-pencil, collapsed-run-quiet, and collapsed-run-quiet-pencil. The default keeps the reference’s quiet mixed-work pencil row while retaining the existing counts and disclosure affordance. collapsed-run-open and collapsed-run-failed cover interaction/failure states.

Gallery before/after (synthetic fixtures, private tailnet).

No capture: no native UI changed. The shared theme additions only carry the gallery-only look key; screenshot evidence is from the actual webview gallery.

Synthetic gallery captures (the supplied private reference is not published):

Before routing repair Selected default after repair
Before: edited-files card After: collapsed tool run

Expanded tool run

Before: gallery health run 39901128946, rendered revision 162bffccbd86. After: gallery health run 39906123591, rendered test merge f47c0b10b1af whose parents include this PR head a06683027ea2. Source: src/agent-session/acpmux/conversation/transcript.gallery.ts. The expansion play passed with 0 layout shift and no anchor movement.

Performance

No new O(rows) work per token. Summary categories/counts, main glyph, failures and running state are memoized by the run’s items. Existing row memos and turn shaping preserve settled rows. Row dispatch adds a constant-time flag check. No timers, observers or animation loops are added; expansion uses the existing motion-gated fold.

Verification

  • Regression commit 99e6b72282d: focused collapsed-run test fails because app dispatch classified the mixed run as an edited-files card.
  • Repair: the same test passes, including the one-line height estimate and permission row visibility.
  • Huge-blue at a06683027ea2: CMUX_BROWSER_TESTS=1 bun test for collapsed runs, consolidated runs, live runs, Codex toggle and adopted replay: 30 passed, including both real Chromium replay tests. A separate focused disclosure run passed 29 tests.
  • Web lint --new-only: passed; inherited formatting findings are identical to base. Type checking and changed-file formatting/lint pass.
  • Pre-push static gate: no new violations.

Observed / Not run

Final exact-head browser/gallery and independent review receipts are recorded in the PR comments. No Swift source changed and no native build was run.

Changelog

  • Changed: consecutive tool calls between messages collapse into an expandable summary naming the work, including file edits.

Agent session: cmux16

teamleaderleo and others added 3 commits October 22, 2026 20:29
…et line, edits too

Leo (2026-10-22, on Codex's transcript): "this is pretty good ui: … the
collapsing i mean". A run's line names its kinds of work in the order they
came, edits included, under the glyph of its main kind; a run with an edit
waiting for permission stays open; a call still running turns the glyph.
Gallery versions: pencil, quiet, quiet-pencil (theme toolRunLook).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 23, 2026
@teamleaderleo

teamleaderleo commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by cx2-transcript on cmux16

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-ttve5 created for this PR by the cmux coordinator.

…-summary

# Conflicts:
#	webviews/src/agent-session/acpmux/conversation/ToolRun.tsx
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review a066830: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr24443 -f ref=tp/tool-run-summary -f platform=macos -f backend_mode=local

Gallery before/after for a066830: 16 states rendered, 2 images differ, 1651 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 39906123376 -R manaflow-ai/cmux -n gallery-advisory-24443-a06683027ea2ec72e40217f20486db29de0f5a15 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/new-chat Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/after-turn Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/working Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/typing-in-dock Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/typing-in-dock Apple System Colors unchanged 0% own App.tsx
agent-pane.docked-chat/long-title Apple System Colors Light unchanged 0% own App.tsx
agent-pane.docked-chat/long-title Apple System Colors unchanged 0% own App.tsx
agent-pane.orchestration-lab/local-queue Apple System Colors Light unchanged 0% own App.tsx
agent-pane.orchestration-lab/local-queue Apple System Colors unchanged 0% own App.tsx
agent-pane.orchestration-lab/build-box Apple System Colors Light unchanged 0% own App.tsx
agent-pane.orchestration-lab/build-box Apple System Colors unchanged 0% own App.tsx
agent-pane.orchestration-lab/cloud-fair-share Apple System Colors Light unchanged 0% own App.tsx
agent-pane.orchestration-lab/cloud-fair-share Apple System Colors unchanged 0% own App.tsx
agent-pane.streaming-follow-motion/stream Apple System Colors Light unchanged 0% own App.tsx
agent-pane.streaming-follow-motion/stream Apple System Colors unchanged 0% own App.tsx
agent-pane.streaming-text/claude Apple System Colors Light changed 0% own App.tsx
agent-pane.streaming-text/claude Apple System Colors unchanged 0% own App.tsx
agent-pane.streaming-text/codex Apple System Colors Light changed 0% own App.tsx
agent-pane.streaming-text/codex Apple System Colors unchanged 0% own App.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Probably yours: agent-pane-edit-awaiting-permission.test.ts, accent-glass-invariants.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): incomingMessage.test.ts, claimPaint.test.tsx, claimPaint.test.tsx and 7 more. This PR merged before its CI finished: fix forward on main.

CI failed on a06683027e (run 39906123406 attempt 1): 2 code, 1 unknown.

Job Verdict Why
web / react-apps-check (3) code a web test failed
web / react-apps-check (4) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs incomingMessage.test.ts a message addressed sender first is that agent's when it names this chat or a listed sender: failed (job)
  • seen on other PRs claimPaint.test.tsx a pooled Settings page claimed by the host reports its paint once its first screen is in: failed (job)
  • seen on other PRs claimPaint.test.tsx a Settings page loaded fresh reports its first paint once its first screen is in: failed (job)
  • new in this PR agent-pane-edit-awaiting-permission.test.ts when the first edit runs, only its file reads as Edited: failed (job)
  • seen on other PRs agent-pane-older-rows-fade.test.ts rows of an older page fade in once as they come into view; opened and live rows do not: failed (job)
  • seen on other PRs newtab-quiet-focus.test.ts composer, dark at 1x: focus keeps the resting one-device-pixel rim, no step in tone: failed (job)
  • seen on other PRs newtab-quiet-focus.test.ts composer, dark at 2x: focus keeps the resting one-device-pixel rim, no step in tone: failed (job)
  • seen on other PRs newtab-quiet-focus.test.ts composer, light at 1x: focus keeps the resting one-device-pixel rim, no step in tone: failed (job)
  • new in this PR accent-glass-invariants.test.ts no orange or system accent and no opaque glass on 1846 gallery stages: failed (job)
  • seen on other PRs composer-bottom-space.test.ts chromium: New Tab stage with the template dots: the quiet row stays clear of the dots: failed (job)
  • ... 2 more in the job logs
Matched log lines
web / react-apps-check (3): (fail) a message addressed sender first is that agent's when it names this chat or a listed sender [0.31ms]
web / react-apps-check (4): (fail) no orange or system accent and no opaque glass on 1846 gallery stages [319914.29ms]

Not re-run automatically: web / react-apps-check (3), web / react-apps-check (4), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: red check: Checks job structure (+2 more) is not red on the base 5cf0048; do not merge until green; see lane-rules
red: web / Web status; base red: the same failure on the base 5cf0048; does not block
red: web / react-apps-check; base red: the same failure on the base 5cf0048; does not block
red: web / react-apps-check (3); NEW: - [] + [ + 1303, + 1293, + 1283, + 1273, + 1263, + 1253, + 1243, + 1233, + 1223, + 1213, + 1203, + 1193, + 1183, + 1173, + 1163, + 1153, + 1143, + 1133, + 1123, (+3 more) is not red on the base 5cf0048; do not merge until green; see lane-rules
red: web / react-apps-check (4); NEW: test/accent-glass-invariants.test.ts > no orange or system accent and no opaque glass on 1846 gallery stages (+3 more) is not red on the base 5cf0048; do not merge until green; see lane-rules

Tour of a06683027e (run): no media. The tour job failed before the tour ran (build or setup); the run log has the output.

@blacksmith-sh

blacksmith-sh Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Found 28 test failures on Blacksmith runners:

Failures

Test View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
/tmp/tmp52oa0h35/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpcxc3ewz0/summary-missing.json (live):/summary-missing.json (live): View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

...and 18 more test failures. View all on Blacksmith: run 39906123426, run 39906123406, run 39906123540

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

teamleaderleo and others added 2 commits October 22, 2026 21:15
…collapsed run

An edit, delete or move still waiting for its permission keeps its own row
in an ended turn's folded run (staysInSight) and keeps a live run from
collapsing (codexRuns), via one predicate, awaitsPermission (Codex review
of #24443).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next / cmux-next checks (god files, concurrency, crash safety, l10n) › Checks job structure is red on 11 of 11 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next / cmux-next checks (god files, concurrency, crash safety, l10n) › No new SwiftUI (macOS UI is AppKit) is red on 11 of 11 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 13 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Verification at a06683027ea2ec72e40217f20486db29de0f5a15:

  • Huge-blue /home/leo/Projects/checkouts/cmux/cx-transcript-24443/webviews: CMUX_BROWSER_TESTS=1 bun test test/transcript-collapsed-tool-runs.test.tsx test/transcript-consolidated-runs.test.tsx test/transcript-live-runs.test.tsx test/codex-tool-runs.test.tsx test/agent-pane-adopted-tool-calls.test.ts — 30 pass, 0 fail, 100 assertions, 43.35s. Both adopted replay browser tests executed in Chromium and passed.
  • Independent focused huge-blue run: collapse/consolidated/live/disclosure — 29 pass, 0 fail.
  • bun run typecheck: no errors in 2445 files. Changed-file formatting/lint pass. scripts/web-lint.sh --new-only passes with inherited formatting warnings from base. prepush-gate.py: no new violations.
  • Regression 99e6b72282d failed app routing (isEditRow true, expected false); repair a06683027ea2 passes the same check and one-line height estimate.

No Swift changed; no native build was run. Primary inspected the actual diff and clean worktree. No new per-token transcript scan or animation/observer/timer was added.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol): SHIP at a066830

Independent read-only Codex review at xhigh on full head a06683027ea2ec72e40217f20486db29de0f5a15 versus 5cf00483c0c: no blocking findings. The routing repair preserves session edit aggregation, keeps permission requests visible, and composes with #24300 takeaway folding. Primary independently inspected the final diff and clean worktree.

Verification: 30 tests passed on huge-blue, including both real Chromium adopted-chat tests; separate disclosure suite 29/29. Primary inspected the closed/expanded gallery images from run 39906123591, rendered at f47c0b10b1af (test merge containing this exact head), and chose the default kind look among four gallery looks.

The required-check list reports none missing and no required check failures. Non-required CI guard reds are in unchanged SwiftUI/workflow/script/notices checks (cmux-next checks, release-notary); SwiftUI, job-structure and release-notary failures are already recorded across unrelated feat-cmux-next PR heads in the base-red comments above; the script checks are also unchanged by this PR. Optional full web shards were still running at the recorded snapshot; the focused current-head browser and transcript verification executed and passed.

@teamleaderleo
teamleaderleo merged commit 3360fb0 into feat-cmux-next Oct 23, 2026
145 of 151 checks passed
@teamleaderleo
teamleaderleo deleted the tp/tool-run-summary branch October 23, 2026 05:42
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

base-red-watch: cmux-next / cmux-next fast tier went red on feat-cmux-next in https://github.com/manaflow-ai/cmux/actions/runs/39913304284 (first red at b9c3d5a, last green at 7822fca). Suspect: #24443 (commit 3360fb0). If it is yours, fix forward on feat-cmux-next.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

teamleaderleo added a commit that referenced this pull request Oct 23, 2026
…bels, not the card (#24505)

#24443 keeps a run whose change still waits for its permission in tool rows
(codexRuns sets foldRun false; isEditRow skips shaped runs), so the held call
stays in sight. The FIRST_RAN check still looked for the mid-turn edited-files
card and failed. It now checks the same thing on the rows: the edit that ran
reads "Edited install.sh +1 -0", the held one reads "Edit install_test.sh".


Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant