Repository navigation
Conversation
…aunch Every session started in an open worktree gets a tab, and the tab outlives the session. A main checkout that agents start in collects hundreds. At launch PaneLayer mounted every one of them, each with its terminal and its chat: on a save of ~650 tabs the Mac app's window reached 8-9 GB within a minute and stopped answering. A pane's content now mounts the first time it shows and stays mounted after, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Stener1 is attempting to deploy a commit to the seanbrydonio's projects Team on Vercel. A member of the Team first needs to authorize it. |
…x its changelog line Seeding 150 tabs takes 12-36 s on a loaded runner, which timed out at the default 30 s in 2 of 5 runs with every assertion passing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Re-verified at
The draft is waiting for one of my ready-PR slots. I can't add 🤖 Generated with Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Mac app's window (WKWebView) grew to 8–9 GB within a minute of launch and stopped answering: chats took ~45 s to open or failed with "the box didn't answer". The boxes answered in milliseconds the whole time. The window itself was the bottleneck.
The cause is the saved tabs.
reconcilegives every session started in an open worktree a tab of its own, and the tab stays after the session ends so it can be started again. A main checkout that agents are started in collects hundreds of these tabs. The report's save had 658 tabs in the worktree shown at launch, 637 of them for sessions that had ended.PaneLayermounts every pane of every mounted workspace, including the current one at launch. So all 658 panes mounted at once, each with itsTerminalViewand, with chat as the view, itsConversationPane.A pane's content now mounts the first time it shows. After that it stays mounted exactly as before: switching tabs or worktrees, splitting and moving never remount it, and a terminal keeps its screen and connection. A pane that has never been shown is the same positioned, empty
data-testid="pane"box. Compare sides and parked panes follow the same rule. No Go code changes, and the saved format doesn't change.Not changed here: the tabs still pile up, and the strip still draws all of them. Closing or folding tabs whose session ended and that were never opened would be the next step. It's a product decision, so it's left out of this PR.
Evidence
A real box and a real save (~650 tabs), Playwright's WebKit on Linux (the engine WKWebView uses). The production build, against a laptop agent of this checkout paired with the box, read-only (writes refused, no terminals attached). Web process RSS and DOM nodes:
It scales with the tab count. Before, at ~80 s: 25 tabs 0.8 GB, 100 tabs 1.7 GB, 300 tabs 3.7 GB, all 4.1 GB. Chromium on the same save, before: 1.3 GB, 47k nodes, 15.7k listeners, and the page stopped answering (a screenshot timed out after 30 s). With no save, the same box sits at ~200 MB in Chromium in every view.
Mock (
drive.mjs many-tabs-launch, 300 saved tabs of ended sessions):Launch, only the agent's tab drawn:


An old tab opened: it draws (its session has ended), and the agent's pane stays mounted behind it:
Tests
app/e2e/many-tabs.spec.ts(new): 150 saved tabs, one pane drawn at launch, two and three after opening old tabs, and going back finds the first pane's same element (not remounted). It fails on main ("expected 1 drawn pane").pnpm test:e2e(548 tests): 534 passed on the first run. The 14 failures were rerun with 2 workers, on this branch and on the same tree with onlypane-layer.tsxreverted. The same 6 fail on both and are not touched by this change:home-triage.spec.ts:41,keyboard.spec.ts:173,sidebar-fleet.spec.ts:25and:123,sidebar-quiet.spec.ts:6,team-setup.spec.ts:331.a11y"database-review in berth-dark" is flaky under load on both, failing 4 of 12 with 3 workers on each build. The rest pass.pnpm test,typecheck:plugins,check:titles,check:type,check:grid,check:csp,check:themes,tsc -p e2e: pass.features/workspace-tabs.md) and a scenario (many-tabs-launch).🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.