Skip to content

cmux NEXT Inspector Connectors: a failed MCP server has Reconnect - #24272

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
session-panel-mcp-reconnect
Oct 26, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
session-panel-mcp-reconnect

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Adopted and rebased (2026-10-25). #24223 landed (f08f46b), so this branch now carries only its own change: the original two commits, patch-identical by range-diff, plus one review fix.

Review fix. A Codex re-review found a bug in reconnectMcp. During a chat switch's hold, the pane still draws the old chat, but reconnectMcp sent the request to selectedSessionId, which already names the chat opening. A Reconnect click on the drawn chat's server therefore went to the hidden chat. reconnectMcp now uses actingSessionId, as Stop, answers and Use tools already do. The fix went in test-first:

  • d77ca88 adds a test to agent-pane-hold-acting-chat.test.ts. On the fleet it failed (received hold-acting-b).
  • 938830c makes the change. On the fleet the hold, connectors and session-start tests pass (12 of 12), and bun run typecheck is clean.

Review. A fresh Codex (gpt-6-astra, xhigh) BLOCKed at 171c452 on that one finding. It then said SHIP at 938830c and confirmed that the earlier review's four fixes still hold.

No new timer or observer.

Leo, on the Inspector: "every item must do something on click; Environment, Context and Connectors: their chevrons open their detail." The dead-click audit (#24116) found that Connectors' "Needs reconnect" and "N to reconnect" looked like actions but were plain text.

What changes

  • Reconnect where it works. acpmux lists _acpmux/mcp/reconnect in initialize where it serves it (snapshot.reconnectsMcp). There, a failed MCP server's row in Connectors has a Reconnect button. It sends reconnectMcp(server) for that server and reads "Reconnecting…" while Claude Code connects it. After an error it reads "Try again" in the danger colour and tries again. Once acpmux marks the server connected, the row says Connected.
  • Plain text everywhere else. On an older acpmux or another harness's chat, "Needs reconnect" stays plain text, so nothing looks clickable that is not.
  • The head line. "N to reconnect" is in the section's disclosure head, which opens the list where the buttons are.
  • Code. The server list moves out of ChatInspector.tsx into inspector/ConnectorsSection.tsx. Three strings are new: chatInspector.connectors.reconnectAction, .reconnecting and .retry, in all 21 locales.

Tests

  • webviews/test/chat-inspector-connectors.test.tsx covers:
    • The button asks for the failed server only.
    • It is disabled while waiting.
    • It reads Try again after a rejection and asks again on a second click.
    • Without onReconnectMcp, the failed state is a <span>, not a button.
  • Gallery: context-connectors-open now shows the failed server with Reconnect.

Observed / Not run

  • Ran scripts/web-lint.sh (passed) and python3 scripts/cmux-next/prepush-gate.py (no new violations).
  • Not run locally: bun tests and tsc (hooks block them on this Mac). PR CI runs them.

Changelog

  • Added: the agent pane Inspector's Connectors offers Reconnect on a failed MCP server of a Claude Code chat.

Agent session: big-red
🤖 Generated with Claude Code

@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 22, 2026
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 22, 2026 07:13 — 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 171c452: 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=pr24272 -f ref=session-panel-mcp-reconnect -f platform=macos -f backend_mode=local

Stale: these images are of 01bd964; the head is now 171c452 and a new capture is running.

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

gh run download 39739067557 -R manaflow-ai/cmux -n gallery-advisory-24272-01bd964607e59e5ca6ea2c53b8ad1342585e2029 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-inspector/full Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/full Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/environment-folders Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/environment-folders Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/context-connectors-open Apple System Colors Light changed 0.144% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/context-connectors-open Apple System Colors changed 0.137% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/changes-breakdown Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/changes-breakdown Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/changes-all Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/changes-all Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/row-hover Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/row-hover Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/subagents-open Apple System Colors changed 0.113% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/subagents-open Apple System Colors Light changed 0.0584% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/subagents-busy Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/subagents-busy Apple System Colors unchanged 0% own ChatInspector.gallery.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.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

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

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards.

CI failed on 171c452103 (run 40244535031 attempt 1): 1 code, 1 unknown.

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

Failures:

  • seen on other PRs agent-pane-bottom-stack.test.ts in a short pane the transcript keeps room and the queue scrolls inside its height: failed (job)
  • seen on other PRs agent-pane-queue-collapse.test.ts a long queue > an opened long queue keeps Show less and the focused row in sight, never a half row (...: failed (job)
  • seen on other PRs agent-pane-queue-collapse.test.ts a long queue > an opened queue with a two-line row shows whole rows only, no row under another (capt...: failed (job)
  • seen on other PRs agent-pane-queue-collapse.test.ts a long queue > a folded queue with a long row opened shows only whole rows above the fold (capture, ...: failed (job)
  • seen on other PRs agent-pane-queue-collapse.test.ts a long queue > Remove and Edit on a row the list's edge cuts do what they say (Leo, 2026-10-20): failed (job)
  • seen on other PRs agent-pane-short-pane-composer.test.ts chromium: in a 260 px pane a grown prompt keeps the card, its controls and the quiet row inside the ...: failed (job)
  • seen on other PRs agent-pane-short-pane-composer.test.ts chromium: in a 330 px pane a grown prompt keeps the card, its controls and the quiet row inside the ...: failed (job)
  • seen on other PRs agent-pane-short-pane-composer.test.ts chromium: in a narrow 420 px pane a grown prompt keeps the card, its controls and the quiet row insi...: failed (job)
Matched log lines
web / react-apps-base-check (2): (fail) in a short pane the transcript keeps room and the queue scrolls inside its height [974.02ms]

Not re-run automatically: web / react-apps-base-check (2), 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 cffeb76 to compare; do not merge until green; see lane-rules
red: web / Web status; base red: the same failure on the base cffeb76; does not block
red: web / react-apps-base-check (2); no finished base run on cffeb76 to compare; do not merge until green; see lane-rules
red: web / react-apps-check; base red: the same failure on the base cffeb76; does not block

Tour of 04c8880ce9 (run): no media. The tour did not run: only webview code changed (9 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label, then re-add media-tour, to tour it on a Mac.

@blacksmith-sh

blacksmith-sh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Found 87 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpe2gl2ams/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmptm_dfo1b/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames 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
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'/
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'
View Logs
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'/
bench OTHER_SWIFT_FLAGS is 'OTHER_SWIFT_FLAGS=$(inherited) -DCMUX_BENCH_HOOKS -DCMUX_BL
OCKING_CHECKS'
View Logs
test/agent-pane-background-tasks.test.ts/agent-pane-background-tasks.test View Logs
test/agent-pane-background-tasks.test.ts/agent-pane-background-tasks.test View Logs

...and 77 more test failures. View all on Blacksmith: run 40251563946, run 40251563977

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

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

Copy link
Copy Markdown
Collaborator Author

Bead cx-i02ch 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

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 13 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in webviews/src/agent-session/acpmux/inspector/ChatInspector.tsx, webviews/test/agent-pane-session-start.test.ts. Listed for a lane to resolve.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

The reviewer was an independent Codex at xhigh effort on big-red (sp-reconnect-review-24272).

  • Its first pass at 7c78f3b BLOCKed on four findings:
    • gallery coverage of ConnectorsSection.tsx;
    • a handler that returns no promise;
    • hover styling on the disabled button;
    • the test did not check the connected rerender.
  • All four were fixed in 9ced85e (rebased from 086bde0, same patch). A re-review confirmed each fix and found nothing new.
  • The rebase onto acpmux: Claude Code's /context breakdown and MCP reconnect #24223's final head 3dd9b61 is patch-identical (range-diff "="). The reviewer confirmed SHIP at this head.

Checks:

  • The fleet compile-check (cmux-ci compile-check --app) passed at 9ced85e.
  • PR CI at 086bde0 (same patch) was 33 passed. The only red was risk evidence, which this receipt clears.

@teamleaderleo teamleaderleo added risk:normal Risk tier (docs/ci/risk-tiers.md) ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds labels Oct 23, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 18 of 21 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 force-pushed the session-panel-mcp-reconnect branch from 171c452 to 938830c Compare October 26, 2026 00:27
@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:high Risk tier (docs/ci/risk-tiers.md) labels Oct 26, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra xhigh, hb-orphan-context-review3): SHIP at 938830c. Round 1 at 171c452 BLOCKed: reconnectMcp sent to selectedSessionId during a chat switch hold. Fixed test-first (d77ca88 red on the fleet, 938830c green: 12 pass, typecheck clean).

teamleaderleo and others added 4 commits October 26, 2026 00:49
Where acpmux reconnects a server (its initialize lists _acpmux/mcp/reconnect:
a Claude Code chat's), a failed server's row in Connectors has a Reconnect
button that sends it for that server, reads Reconnecting… while Claude Code
connects it and Try again after an error; once acpmux marks the server
connected, the row says Connected. Elsewhere "Needs reconnect" stays plain
text, so nothing looks clickable that is not (dead-click audit #24116).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16037-16c2-7a73-b063-2e37ed40b9c4&host=cosmic-gray
Codex review: the gallery covers ConnectorsSection.tsx; a handler that
returns no promise still settles the button; a disabled Reconnecting
button gets no hover underline; the test rerenders the server connected
and checks the row reads Connected, not a button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16037-16c2-7a73-b063-2e37ed40b9c4&host=cosmic-gray
… screen (red)

Codex review of #24272: reconnectMcp names selectedSessionId, which during a
chat switch hold is already the hidden chat opening, not the one drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… screen

reconnectMcp sends to actingSessionId, as Stop, answers and Use tools do: while
a switch holds the pane on the chat before, the Inspector the person clicks is
that chat's, so its server name goes to that chat, not to the chat opening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo force-pushed the session-panel-mcp-reconnect branch from 938830c to 04c8880 Compare October 26, 2026 00:54
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

high-signal review link / link is red on 21 of 24 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

Review (codex gpt-6-astra xhigh, hb-orphan-context-review4): SHIP at 04c8880 (rebase of 938830c onto feat-cmux-next; range-diff unchanged apart from one import line). Fleet at this head: 12 pass, typecheck clean.

@teamleaderleo
teamleaderleo merged commit 4aadb48 into feat-cmux-next Oct 26, 2026
141 of 155 checks passed
@teamleaderleo
teamleaderleo deleted the session-panel-mcp-reconnect branch October 26, 2026 01:26
@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40254211483 at 4aadb48 failed: cmux-next Release compile (fleet fast check).
Those jobs last passed at b14d855. This pull request is one of 2 merged since: #25183, #24272.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40255417638 at ebbefce failed: cmux-next Release compile (fleet fast check).
Those jobs last passed at b14d855. This pull request is one of 3 merged since: #24272, #24289, #25147.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40254440965 at c7c6530 failed: cmux-next Release compile (fleet fast check).
Those jobs last passed at b14d855. This pull request is one of 2 merged since: #24272, #24289.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

teamleaderleo added a commit that referenced this pull request Oct 26, 2026
Claude Code's stream-json rate_limit_event lines become the session
detail's usageLimits and a session_info_update with
_meta.acpmux.usageLimits: {windows: [{id, usedPercent 0-100, resetsAt?}]},
newest per window. five_hour is session, seven_day weekly, seven_day_opus
weekly_opus, seven_day_sonnet weekly_sonnet; overage windows are left out.

A failover clears them (the old account's), and a retired agent's late
limits are dropped by the same guard as its /context answer
(agent::process_state, in tap_live and the hub's generation check). A
change is saved with the meta, as a breakdown is.

Rebased onto feat-cmux-next: #24223/#24272 (context breakdown, MCP
reconnect) already landed, so this carries only the usage limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 26, 2026
…4293)

* test: a Claude chat keeps its account's plan usage limits; a failover drops them (red)

fake_claude sends rate_limit_event lines (rate-limits-probe, FAKE_CLAUDE_LIMITS=1,
and a late one from a replaced process). The chat's detail must carry
usageLimits, newest per window, and lose them on a harness failover; a
replaced process's late limits are neither logged nor applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* acpmux: forward a Claude Code chat's plan usage limits to clients

Claude Code's stream-json rate_limit_event lines become the session
detail's usageLimits and a session_info_update with
_meta.acpmux.usageLimits: {windows: [{id, usedPercent 0-100, resetsAt?}]},
newest per window. five_hour is session, seven_day weekly, seven_day_opus
weekly_opus, seven_day_sonnet weekly_sonnet; overage windows are left out.

A failover clears them (the old account's), and a retired agent's late
limits are dropped by the same guard as its /context answer
(agent::process_state, in tap_live and the hub's generation check). A
change is saved with the meta, as a breakdown is.

Rebased onto feat-cmux-next: #24223/#24272 (context breakdown, MCP
reconnect) already landed, so this carries only the usage limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* acpmux tests: rustfmt the failover log filter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: teamleaderleo <teamleaderleo@users.noreply.github.com>
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

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant