cmux NEXT agent pane: a crashed page retries on its own; Chromium chats ignore their hidden WebKit view's end
Leo, 2026-11-01, with a screenshot of "The agent pane crashed. [Reload]" over his chats: "how come it says this??? why doens't it just retry on its own", and after it: "i had to close and reopen".
What happened on his Mac (NIGHTLY, 2026-10-31 23:15 local)
- WebKit's own GPU process was SIGKILLed three times in 20 s (launchd:
signal service: caller = cmux[31679], value = 0x9at 23:14:54, 23:15:01, 23:15:14.353). The caller is the WebKit UI side inside cmux; no cmux code kills a GPU process. Memory pressure waswarning(the WebKit browser tab's line in the same burst). - 4 ms after the third kill WebKit ended every web content process (
GPUProcessCrashedTooManyTimes). Other app pages (cmux.icon-picker,cmux.apps,cmux.markdown,cmux.changelog) reloaded by themselves. All 19 agent pages (18 chats + New Tab) loggedreason=unknown pid=0 engine=cef ... no automatic reloadand showed the notice. - The 19 chats showed in Chromium. What ended was the hidden WebKit view under each one, not the Chromium renderer.
PageWebView.contentProcessTerminatedstill reset the page's router (the bridge of a live Chromium document) and the pane showed the notice over a chat whose renderer was still running.
Change
- A page that shows in Chromium ignores the end of its hidden WebKit view's process (
PageWebView.webContentEnded). It logs one line and does not reset the router or notify the host. On Leo's Mac this alone would have left all 19 chats untouched. - A real end retries on its own (
AgentPageCrashRetry,AgentPageCrashBudget, wired inAgentPaneView+CrashNotice.swift). A pane on screen loads again once its backoff has passed (0 s, then 1 s, then 4 s). A pane nobody sees waits until it is next shown, so 19 background chats don't start 19 processes at once. No notice shows while it recovers. The fourth end within 60 s shows the notice with Reload, and Reload starts a fresh budget. Closing the chat, or the page loading again by itself, cancels an owed retry. The per-page log lines and the crash marker stay; the per-page line now saysloads again by itselforkept ending: the crash notice offers Reload. - The retry and Reload start a new process. On WebKit they load the document instead of calling
reload(), which does nothing for a view whose process ended before its first commit (it has no URL). On Chromium they reload the tab, which starts a new renderer.
Why Reload didn't bring the chats back for Leo is not proven from the logs. Only one of the 19 logged loaded again (23:15:22) after a Reload. The likely part is (1): a Reload of a chat whose live bridge had been reset. With (1), those chats are never torn down in the first place.
Tests
AgentPageCrashRetryTests: the budget (3 retries with backoff, then the notice, sliding window, Reload resets); a chat on screen loads again with no notice and starts a WebKit load; a background chat waits until shown; a crash loop shows the notice; a chat that came back by itself or closed is not retried.PageWebViewCrashReloadTests.aHiddenWebKitEndUnderAChromiumPageEndsNothing: the exact case from Leo's Mac. A Chromium page gets WebKit's termination callbacks, the host hears nothing, the page keeps Chromium, nothing reloads; its Chromium renderer crashing still reports. The.endedtest now also checks that Reload starts a WebKit load.AgentPageTerminationsTests: those chats now start with their retries spent, so they keep testing the notice and group Reload.
The failing tests are committed first (faff9c3158d), then the fix.
Observed / Not run
- Ran:
scripts/cmux-next/prepush-gate.py(no new violations). Swift suites run on the fleet: see the comment below. - Not run: a live reproduction on a build (a GPU process kill under memory pressure).
Changelog
- Fixed: An agent chat whose page process ended now loads again on its own instead of showing "The agent pane crashed."; the notice shows only if it keeps crashing.
risk: normal (agent pane crash path; no data or persistence).
š¤ Generated with Claude Code
Agent session: agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the agent pane crash notice showing over chats that still worked, and makes a genuinely crashed page retry on its own.
- A page that shows in Chromium ignores the end of its hidden WebKit view's process, so a WebKit-side crash no longer resets a live Chromium page's bridge or shows the notice.
- A page whose process actually ends retries on its own with backoff (0, 1, 4 s); the crash notice shows only after 3 retries within 60 s, and Reload starts a fresh budget.
- Background chats wait until next shown before retrying, so many ending at once don't all start processes.
- Retry and Reload start a new process: WebKit loads the document, Chromium reloads the tab.