Skip to content

Agent chat: a subagent nothing named reads by its kind or as Subagent, never by an id; ids go in the tooltip - #24280

Closed
teamleaderleo wants to merge 7 commits into
feat-cmux-nextfrom
tp/subagent-row-title
Closed

teamleaderleo wants to merge 7 commits into
feat-cmux-nextfrom
tp/subagent-row-title

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Leo-ask: ask-e6e2477545

Leo: "this needs to be rendered better... it is now right". A subagent's end line read Subagent finished: 7dc1f162-…/toolu_01H9Jk66ek2xu2m2SaOS09M1 · 1…: the raw session and tool-use ids, cut off.

Stacked on #24051 (tp/subagent-stopped-reason): this PR's base branch is feat-cmux-next, so until #24051 lands the diff shows both; this PR's own commits are the top two.

Root cause

subagents/subagentFold.ts named a subagent change.name ?? change.task ?? change.id. A subagent whose first record in the pane carried no name (a page of history that starts after its spawn; a harness that names none) got its raw <session>/<tool call> id as its name for good.

What changes

  • acpmux (cmux-tui/crates/acpmux/src/subagents.rs): a state change or progress record that names no subagent now carries the name it was spawned with (or last given), so a client reading only newer records never falls back to the id. Rust test: a_nameless_state_update_carries_the_spawned_name.
  • The fold: a subagent nothing named is marked unnamed and has no name. Its rows call it by its kind (Claude's subagent_type, "Explore"), else "Subagent" (tray, summary card, Inspector, pill, group). It is never called by an id, short or raw. A later record with a real name, or the spawning Agent call's description (rawInput), names it. A named subagent keeps its name.
  • The done line: "Subagent failed: Explore · 40m", or "Subagent finished · 2h 6m" when there is no kind either (new strings subagents.endedPlain.*).
  • Ids in the tooltip: the done line's tooltip holds the full id and Claude's agentId. The row text never does.
  • A message to an unnamed subagent reads as the generic recipient, not its id (conversation/agentNames.ts).
  • Status and duration are unchanged ("finished", "failed", "stopped" plus the reason from Agent chat: a stopped subagent's line says why (stopped by you, interrupted by Send now) and offers Restart #24051, then the duration). Clicking a row still opens the subagent; subagent click routing is untouched (cmux NEXT agent pane: a click on a subagent stays in the chat unless panes are on #24017 is not touched).
  • Strings, all 21 languages: subagents.unnamed ("Subagent"), subagents.endedPlain.{completed,failed,cancelled,disconnected}.

Tests (cmux16, at the head)

  • webviews: 49 pass in the subagent suites, and 120 pass across every test touching these names. A new test asserts that the visible line text matches no id pattern: no toolu_/call_, no a/b path, no 6+ character word mixing letters and digits. The other new tests cover kind or "Subagent", agentNames skipping unnamed agents, and the Restart prompt for an unnamed subagent. vp check finds no type errors, and the xcstrings lint passes.
  • cargo test -p acpmux --lib subagents: 13 passed (the Rust code is unchanged since that run).

Before / after (gallery, synthetic fixtures)

New variant agent-pane.subagent-tray#unnamed-line. Before: the line drew the raw id, as in Leo's report above (the variant is new, so the base has no frame of it). After, from top to bottom: a named subagent, an unnamed one with a kind, and an unnamed one with neither:

after

Compare page: https://cmux-lawrences-mac-mini.tail137216.ts.net:18796/compare/tp-subagent-row-title/?entry=agent-pane.subagent-tray

risk:medium (behaviour change). An independent Codex xhigh review via acpmux posts its receipt at the head.

Agent session: cosmic-gray

🤖 Generated with Claude Code

@cursor

cursor Bot commented Oct 22, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 22, 2026 07:25 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

Review f4f4707: 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=pr24280 -f ref=tp/subagent-row-title -f platform=macos -f backend_mode=local

Probably yours: subagent-stopped-after-cancel.test.ts fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): accent-glass-invariants.test.ts, composer-bottom-space.test.ts, composer-bottom-space.test.ts and 12 more.

CI failed on f4f4707a6e (run 39923325970 attempt 1): 2 code, 1 unknown.

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

Failures:

  • seen on other PRs accent-glass-invariants.test.ts no orange or system accent and no opaque glass on 1855 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)
  • seen on other PRs composer-bottom-space.test.ts webkit: New Tab stage with the template dots: the quiet row stays clear of the dots: failed (job)
  • seen on other PRs lit-glyph-css.test.ts a lit control's ink is the lit glyph, not the raw accent: 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)
  • seen on other PRs newtab-quiet-focus.test.ts composer, light at 2x: focus keeps the resting one-device-pixel rim, no step in tone: failed (job)
  • 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)
  • ... 6 more in the job logs
Matched log lines
web / react-apps-check (4): (fail) no orange or system accent and no opaque glass on 1855 gallery stages [329611.30ms]
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.44ms]

Not re-run automatically: web / react-apps-check (4), web / react-apps-check (3), 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); no finished base run on 749d735 to compare; do not merge until green; see lane-rules
red: web / Web status; NEW: green on the base 749d735; do not merge until green; see lane-rules
red: web / react-apps-check; no finished base run on 749d735 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (3); no finished base run on 749d735 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (4); no finished base run on 749d735 to compare; do not merge until green; see lane-rules

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

gh run download 39923326037 -R manaflow-ai/cmux -n gallery-advisory-24280-f4f4707a6e77770e0c999b5c1a1f9d4372b2db6f (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-inspector/full Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/full Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/environment-folders Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/environment-folders Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-connectors-open Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-connectors-open Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-breakdown Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-breakdown Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-breakdown-hues Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-breakdown-hues Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-breakdown-mono Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/context-breakdown-mono Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/changes-breakdown Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/changes-breakdown Apple System Colors unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/changes-all Apple System Colors Light unchanged 0% own SubagentsSection.tsx
agent-pane.chat-inspector/changes-all Apple System Colors unchanged 0% own SubagentsSection.tsx
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.composer-turn-cycle/idle Apple System Colors Light unchanged 0% own SubagentGroup.tsx
agent-pane.composer-turn-cycle/idle Apple System Colors unchanged 0% own SubagentGroup.tsx
agent-pane.composer-turn-cycle/running Apple System Colors Light changed 0.0572% own SubagentGroup.tsx
agent-pane.composer-turn-cycle/running Apple System Colors changed 0.0475% own SubagentGroup.tsx
agent-pane.composer-turn-cycle/subagents-one Apple System Colors changed 0.0189% own SubagentGroup.tsx
agent-pane.composer-turn-cycle/subagents-one Apple System Colors Light changed 0.0113% own SubagentGroup.tsx

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

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 22, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Found 51 test failures on Blacksmith runners:

Failures

Test View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs
---/--- View Logs

...and 41 more test failures. View all on Blacksmith: run 39923325970, run 39923325851, run 39923326047

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@cursor

cursor Bot commented Oct 22, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 22, 2026 07:53 — with GitHub Actions Inactive
@teamleaderleo teamleaderleo added risk:medium and removed risk:normal Risk tier (docs/ci/risk-tiers.md) labels Oct 22, 2026
@teamleaderleo

teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by nx-chat on big-red · took over from session 01a16030

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:medium labels Oct 22, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): BLOCK at 09beb7c

  • webviews/src/agent-session/acpmux/conversation/agentNames.ts:16-17 — agentNames() now treats the fold's synthetic short id as a real recipient name when an unnamed subagent has an agentId and no task. MessageCard therefore renders an opaque value such as Sent to 01H9Jk66 instead of the generic localized agent, contradicting this file's contract that a recipient name is never an id. Exclude agent.unnamed from this map (and add a regression test) before shipping.

I reviewed only commit 09beb7c92eb7d1f56495eb961ebf0a9531f2a80f against parent e04ab85cf2a627a65898280c89bc14d1f87aac2c. The Rust _meta.acpmux.subagents name additions preserve the existing exact JSON assertions I found; the 21 new locale entries all include {id}. No builds or tests were run, per request.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 22, 2026 08:25 — with GitHub Actions Inactive
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 22, 2026 08:28 — with GitHub Actions Inactive
@teamleaderleo teamleaderleo changed the title Agent chat: a subagent nothing named reads by a short id, never its raw id; ids go in the tooltip Agent chat: a subagent nothing named reads by its kind or as Subagent, never by an id; ids go in the tooltip Oct 22, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): BLOCK at edcdc35

  • webviews/src/agent-session/acpmux/subagents/subagentRows.ts:42 — An unnamed nested parent now has name: "", so childView() falls through agents.get(agent.parent)?.name || chat and renders the child’s “Subagent of …” pill as the chat name. That misidentifies the direct parent; the new generic/localized subagentName() (Subagent, or its kind) is not used here. Pass the display-name/localization through this path (and add a nested unnamed-parent regression) so it reads the parent as “Subagent” rather than the containing chat.

The prior raw/short-id leak is fixed: row, tray, summary, Inspector, restart, and done-line paths use the safe display name/plain localized endings; agentNames() skips unnamed recipients; all 21 locales contain the new strings; existing Rust exact-shape assertions remain compatible. Fleet verification reported by the coordinator is green (subagent suites, related tests, typecheck, and xcstrings lint); I ran no builds or tests.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 22, 2026 08:44 — with GitHub Actions Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): SHIP at 9d0b854

No blocking findings.

The prior nested-parent issue is fixed: childView() now uses subagentName() with the pane translator, and App.tsx includes t in the memo dependencies. The new regression covers an unnamed parent, a kinded parent, and a top-level subagent. I rechecked the complete two-commit diff against 6f1eec42d833740f4ecb16fe499fa6a617396228: all visible unnamed-agent paths use the safe kind/localized fallback or plain localized endings; agentNames() skips unnamed recipients; tooltip IDs remain governed by tooltip-allow; the 21 locale entries and Rust record-shape changes remain consistent. Fleet verification reported by the coordinator is green (50 subagent tests and clean typecheck); I ran no builds or tests.

…ent-row-title

# Conflicts:
#	webviews/src/agent-session/acpmux/subagents/subagentFold.ts
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 23, 2026 04:42 — with GitHub Actions Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): SHIP at 0e14b22

  • All additions/deletions match shipped.diff across 20 files; only offsets, object IDs, and expected base context differ.
  • Resolution preserves base’s hiddenCall declaration and !hidden guard, plus both readSpawnCall and readDescription.
  • Catalog adds exactly the same five keys: four subagents.endedPlain.* keys and subagents.unnamed, with byte-identical content.
  • No unrelated changes or base reversions found.

Read only the two diffs; no checkout, build, or tests.

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 23, 2026 05:11 — with GitHub Actions Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex xhigh, correctness first): SHIP at 0adee35

Only test formatting changed; behavior is unchanged.

Codex xhigh shipped 0e14b22 (comment above). 0adee35 is that head plus one vp fmt commit on subagentFold.test.ts. The commit joins one feed(...) call onto a single line, because fast gates' web lint flagged the formatting. git diff 0e14b223 0adee356 is 1 insertion and 5 deletions in that test file, with no change in behaviour.

@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 13 of 13 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) › Script tests (pin-cmux-tui, embed-cef, ensure-cef store) is red on 13 of 13 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
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 23, 2026 06:43 — with GitHub Actions Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next / cmux-next swift test is red on 7 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

Orphaned: no activity for 66 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in cmux-tui/crates/acpmux/src/subagents.rs, webviews/src/agent-session/acpmux/App.tsx, webviews/src/agent-session/acpmux/inspector/SubagentsSection.tsx, webviews/src/agent-session/acpmux/subagents/SubagentTray.tsx, webviews/src/agent-session/acpmux/subagents/subagentFold.test.ts, webviews/src/agent-session/acpmux/subagents/subagentFold.ts. Listed for a lane to resolve.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Stale (13d, conflicts); rebuild fresh from feat-cmux-next if still wanted

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded by the landed subagent-kind implementation (commit 3f9cd6c); this stale PR is already closed.

This branch was previously deployed

4 inactive (3 outdated) deployments
cmux-tui-merge-tree — f4f4707a Deployed Oct 23, 2026 by teamleaderleo via publish the merge tree #5093
ci-routing-agent — 0adee356 Deployed Oct 23, 2026 by github-actions[bot] via cmux-next macOS placement #31416
artifacts — 0e14b223 Deployed Oct 23, 2026 by teamleaderleo via add the Windows daemon to the tree #44940
sentry-dsyms — 0e14b223 Deployed Oct 23, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #44940
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