Skip to content

Running tray: background commands read in words, not shell - #34845

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
lane/hat-command-labels
Nov 4, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
lane/hat-command-labels

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-03, on the running tray above the composer showing raw shell lines (glaeda-gh wait run manaflow-ai/cmux/41762593154 --until done --timeout 3000 2>..., python3 -c "import time; time.sleep(560)"; ...):

we should be able to parse these more... like instead of raw things, we should be able to deterministically/heuristically have stuff

What changes

A background command's tray line is now named, in this order:

  1. The call's own description. Claude's Bash description was already used when the transcript had the call loaded; a process whose call was not loaded (an older page, a long wait) fell back to the shell line. acpmux now keeps description on the process record (claude_stdio sends it on the shell's running update, hub/processes.rs stores and lists it, docs/background-processes.md), and the web side reads it from the registry. Codex sends no such field, so its commands use the rules.

  2. A declarative rule table, webviews/src/agent-session/acpmux/session-info/commandRules.ts (COMMAND_RULES: program, icon, and a reader that gives a pane string, its values and an optional link). Seed rules:

    • glaeda-gh wait run|pr → "Waiting on cmux checks" / "Waiting on cmux#34769 checks", linking the run or PR
    • gh pr merge N → "Merging #N" ("Merging cmux#N" with -R, linked); gh pr checks N --watch, gh pr create, gh run watch
    • cmux-ci test --setup playwright → "Fleet tests · Playwright"; cmux-ci test -- cargo test -p X → "Fleet tests · cargo test X"; cmux-ci run --key …-34769-… → "Fleet run for Session context: inspect sources and edit future guidance #34769"; cmux-ci compile-check
    • sleep N and python3 -c "import time; time.sleep(N)" → "Waiting 9m 20s"
    • git push, cargo test|build -p X, bun test FILE, xcodebuild -scheme S test|build

    Before matching, the command is cut to the one program that does the work: comments (# fg-ok), cd X &&, export/assignment steps, env/timeout N/nohup/nice wrappers, redirections, pipes (| tail -5) and later steps. One linear pass, quotes and $(...) kept whole.

  3. Its program and main argument (bun run dev, python3 merge_freeze.py, make), after fix(next): keep shell fragments out of running-command titles #34679's commandWorkLabel for a line with command substitutions.

Builds on #34679 (merged while this was open): a setup step's substitution is still named before the rule's words, so SHA=$(git rev-parse HEAD); cmux-ci run … reads "git rev-parse HEAD · Fleet run" (it read "git rev-parse HEAD · cmux-ci run"); #34679's tray and gallery expectations change to that. A substitution inside the program's own arguments (--key x-$(date +%s)) is part of what the rule reads. commandLabel itself is unchanged.

Takes back #34679: only the outer operation's words in its two tray expectations ("cmux-ci run" → "Fleet run"), since the rule names it better; its substitution naming stays.

The raw command stays the line's tooltip, and the expanded tail now starts with it. A line whose rule names a run or pull request gets an "Open on GitHub" link in its tail. The per-row elapsed time is unchanged. New strings are in Localizable.xcstrings with every locale.

Gallery: agent-pane.subagent-tray → command-words (the commands from the screenshot, opened; its play checks the labels).

Tests

  • webviews/test/command-rules.test.ts: table-driven over real commands from the screenshot and agent transcripts, plus description precedence, the registry description, the program cutting and a linear-time check.
  • webviews/test/subagent-tray.test.tsx: the undescribed nice bun test line now reads "Running tests".
  • acpmux: the_running_update_carries_the_calls_description, a_description_round_trips_and_is_left_out_when_absent.

Observed / Not run

  • Fleet (cmux-ci test) at the pushed head: bun run check green, check:design-tokens green, 164 tests pass across command-rules, subagent-tray*, background-tasks-open, session-info*, summary-background-work and agent-pane-workflow-progress; strings-build-output passes.
  • acpmux on the fleet: cargo test -p acpmux --lib -- background_output process_index, 9 passed, including both new tests.
  • Review follow-up fixed: xcodebuild … clean/archive falls back instead of reading Building. Left as a follow-up: a background acpmux send keeps its send label ahead of its call's description, as before.
  • Not run: a gallery capture of command-words (the advisory gallery run covers it) or a DEV build.

Changelog

Changed: Background commands in the running tray read in words ("Waiting on cmux#34769 checks", "Fleet tests · Playwright", "Waiting 9m 20s") instead of the raw shell line, which stays in the tooltip.

🤖 Generated with Claude Code

Agent session: agent session

teamleaderleo and others added 3 commits November 3, 2026 20:34
The tray names a background command by its call's description (now kept by
acpmux on the process, so a client that never loaded the call still has it),
else by a declarative rule table (session-info/commandRules.ts), else by its
program and main argument. The raw command stays the tooltip and the first
line of the expanded tail, which links a run or pull request.

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

cursor Bot commented Nov 4, 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 added 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) labels Nov 4, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 40b5b14: 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=pr34845 -f ref=lane/hat-command-labels -f platform=macos -f backend_mode=local

Shipped in:

teamleaderleo and others added 2 commits November 3, 2026 21:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, router-review): SHIP at 38c2f67

Visual verdict: no images; Leo tries the build.
Follow-ups:

  • F1 [follow-up] gh run watch --interval 10 ID / gh pr checks --interval: treat --interval/-i as valued flags. outcome:pending
  • F2 [follow-up] An unquoted redirect glued to an argument (bun test a.test.ts>/tmp/x.log) names the output file. outcome:pending
  • F3 [follow-up] Capture the command-words gallery state with its tails open. outcome:pending

Earlier receipt at 1725c2a (same model): SHIP, follow-ups: send label precedence over a description; xcodebuild clean read as Building (fixed at 38c2f67).

@teamleaderleo
teamleaderleo merged commit f8a134a into feat-cmux-next Nov 4, 2026
21 of 22 checks passed
@teamleaderleo
teamleaderleo deleted the lane/hat-command-labels branch November 4, 2026 05:50
cmux-bot Bot pushed a commit that referenced this pull request Nov 4, 2026
…Bash call's description (#35548)

#34845 sends a background shell's `description` (Claude's Bash `description`) in its
`background_task_update` and keeps it on the process row (docs/background-processes.md), so a
client that never loaded the call still names it. The hub_integration background_task and
processes tests still expected the rows without it and went red on feat; they now expect the
fake's descriptions ("Run npm run dev", "Run cargo test", "Build").
@lawrencecchen

Copy link
Copy Markdown
Contributor

Base red from this PR: the background task updates and process rows now carry description, and the hub_integration background_task and processes tests still expected rows without it. Fix in #35548 (tests expect the description).

(BASE RED SUITE for the cmux-next Performance Lead; nothing to do unless you disagree with the fix.)

This branch was successfully deployed

1 inactive deployment
artifacts — 38c2f673 Deployed Nov 4, 2026 by teamleaderleo via publish tree-addressed cmux-tui #109845
sentry-dsyms — 38c2f673 Deployed Nov 4, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #109845
ci-routing-agent — 38c2f673 Deployed Nov 4, 2026 by teamleaderleo via cmux-tui tree preflight #109845
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.

2 participants