Skip to content

Session Info Subagents: idle ones leave "running", rows named by task, the limit line says what it caps - #33194

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
fix/session-info-subagents
Nov 3, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
fix/session-info-subagents

Conversation

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Leo, on the NEXT nightly's Session Info Subagents section (2026-11-02): "but what's going on with these?"

It showed "15 running · 27 done", then "Running 0 / 1000 max", then rows named by a raw session id ("01a18fcd-c1c7-7c…") that each read "1h 55m … Running".

Causes and fixes

  1. Two counts, two sources. The head counts the chat's own subagents (Agent tool calls). The "Running X / Y max" line counts only the chats the agent started with start_session (acpmux subsessionLimits), and caps those, not Agent subagents. With no started chats it read 0 while 15 subagents ran.
    • The line now reads "Started chats: 0 of 1000 at once", so it says what it counts and what the limit caps. − / + still set the cap. The 1000 is acpmux's top of range (MAX_RUNNING.max), and the settings set the cap there.
    • The head and every line now read one status from one clock (subagentStatus(agent, waiting, now)), so a line and the head can no longer disagree.
  2. Rows named by raw ids. acpmux put a subagent's name/task only on its subagent_spawned event. A pane that read the chat's log from a page after the spawn met the subagent first through subagent_progress and named it by its id.
    • acpmux (subagents.rs) now remembers each subagent's name and puts it on every later progress and state event. A later name, such as a workflow's launch, replaces it.
    • The pane falls back to the first line of the subagent's prompt, and uses the id only when nothing else names it.
  3. "Running" for two hours. A subagent that ended its turn but waits on background work of its own (Claude's run_in_background) stays running in acpmux.
    • The fold now tracks quietSince: the last line, call or new token count while none of the subagent's calls is open.
    • After 3 minutes quiet with no call open (IDLE_AFTER_MS), the subagent reads Idle: in its line, in the head ("3 running · 2 idle · 1 done") and out of the running shimmer.
    • A subagent with an open call (a long build) stays Running.

Gallery

agent-pane.session-info/subagents-idle (SessionInfo.gallery.tsx) renders this state.

Tests

  • test/subagent-idle-and-name.test.ts (new): naming from a prompt when a subagent is met through progress; idle vs open call vs repeated progress.
  • test/native-session-info-activity.test.ts: the head reads "2 running · 1 idle · 1 done", the idle row's tone and wave, and the limit line's words.
  • test/subagent-limit-stepper.test.tsx: the new limit wording.
  • acpmux subagents.rs: a_progress_update_carries_the_name_its_spawn_gave.

Design spec: design/session-info.md (Subagents section).

Risk: low. The change touches display state only and changes no lifecycle; acpmux only adds a name field to events.

🤖 Generated with Claude Code

Agent session: agent session

teamleaderleo and others added 2 commits November 2, 2026 22:42
… task, the limit line names started chats

Leo, 2026-11-02: "but what's going on with these?"

- A running subagent quiet past 3 minutes with no call open reads Idle in its
  line and in the section head; both read one status on one clock.
- acpmux carries a subagent's spawn name on its later progress and state
  events, and the pane falls back to the prompt's first line before the id.
- The limit line caps the chats this chat started, not its subagents: it
  now reads "Started chats: N of M at once".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo teamleaderleo added the leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 8347eba: 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=pr33194 -f ref=fix/session-info-subagents -f platform=macos -f backend_mode=local

Gallery before/after for 8347eba: 16 states rendered, 14 images differ, 3155 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41599448199 -R manaflow-ai/cmux -n gallery-advisory-33194-8347ebaa94ea16bbcf4b6ae21bee79c331b6aadf (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-inspector/subagents-idle Apple System Colors Light new 0% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/subagents-idle Apple System Colors new 0% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/full Apple System Colors Light changed 0.22% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/full Apple System Colors changed 0.216% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-more Apple System Colors changed 0.443% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-more Apple System Colors Light changed 0.417% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-more-open Apple System Colors Light changed 0.285% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-more-open Apple System Colors changed 0.257% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-folded Apple System Colors Light changed 0.292% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-folded Apple System Colors changed 0.216% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-capped Apple System Colors changed 0.263% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/compact-capped Apple System Colors Light changed 0.22% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/workflow-running Apple System Colors Light changed 0.0068% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/workflow-running Apple System Colors changed 0.006% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/workflow-finished Apple System Colors Light unchanged 0% own SessionInfo.gallery.tsx
agent-pane.chat-inspector/workflow-finished Apple System Colors unchanged 0% own SessionInfo.gallery.tsx
agent-pane.chat-inspector-surfaces/transcript Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/transcript Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/diff-in-place Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/diff-in-place Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/document-beside Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/document-beside Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/diff-closed Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.chat-inspector-surfaces/diff-closed Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/animated Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/animated Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/jump Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/jump Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/steady Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/steady Apple System Colors unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/popover Apple System Colors Light unchanged 0% own SessionInfo.tsx
agent-pane.inspector-composer-foot/popover Apple System Colors unchanged 0% own SessionInfo.tsx

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

web and size checks: green

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

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

blacksmith-sh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_event_stream_drift_is_rejected (main.InventoryContractTests.test_event_stream_
drift_is_rejected)/
test_event_stream_drift_is_rejected (main.InventoryContractTests.test_event_stream_
drift_is_rejected)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at 11998ef

BLOCK at 11998ef

Visual verdict: no images; Leo tries the build

  1. [P1] [blocking] subagents.rs:245: Mask names before truncating the cached copy. A name containing a GitHub token across the 60-character boundary is initially masked correctly. After completion and a nameless resume, the cached fragment reaches subagentNames; the incomplete token no longer matches the scanner. Base exposes no name on that resume. Add a lifecycle regression test.

  2. [P2] [follow-up] subagentFold.ts:1182: Publish quietSince changes through the UI cache. AgentProgressStore omits it from structureVersion, so App retains old agent snapshots. Reproduced: text activity leaves an active agent appearing Idle; call completion leaves a quiet agent appearing Running indefinitely.

  3. [P2] [follow-up] subagentFold.ts:373: Track open calls before the agent’s identity arrives. The earlier unknown-owner branch returns before this bookkeeping. Reproduced: a paged log containing an open build followed by the agent’s first progress labels it Idle after three minutes while the build remains open.

  4. [P2] [follow-up] subagents.rs:249: Cache the task when no name exists. Codex legacy spawns supply task, but this branch discards it, leaving later nameless events—and clients starting after spawn—with raw IDs.

Follow-ups:

…names, open calls before identity, snapshot follows quietSince)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at ab59434

Reviewer: codex gpt-6-astra high, fast tier.

Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at ab59434
Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] webviews/src/agent-session/acpmux/subagents/subagentFold.ts:375: A ToolSearch opened before the subagent’s identity arrives enters openCalls, but its completion is excluded by tool because it is hidden. Reproduced: quietSince remains undefined after completion, preventing Idle indefinitely. Track call completion independently of visibility and add this paged-history case to the tests.
  2. [P2] [follow-up] webviews/src/agent-session/acpmux/session-info/SessionInfo.gallery.tsx:1329: After screenshots are unavailable; verify the idle gallery state in the build.

Changed TypeScript files parse successfully. Full tests were unavailable because Bun and dependencies are absent.

Follow-ups:

  • Track hidden-call completion consistently.
  • Verify the idle gallery visually.

…-info-subagents

# Conflicts:
#	webviews/src/agent-session/acpmux/Localizable.xcstrings

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves ab59434: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant