You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Closed SSH tabs return after relaunch, agent sessions get mixed up, and Orca runs hot #15136
The park diagnostics showed the same terminal changing state 3–11 times within one second.
After restarting Orca, another 33 terminal_replay_guard_wedged_release events and 3 WebGL atlas resets occurred during the first minute.
This happened in the same workspace where closed terminal tabs were restored after relaunch, although I do not know whether both problems have the same root cause.
Related to #12447 (closed SSH tabs resurrecting on reattach). Leaving this open: the title mentions restored closed tabs, but the body and diagnostics are a distinct heat/CPU issue (terminal_replay_guard_wedged_release, WebGL atlas resets, park churn).
Leaving this open. The one-line side note is fixed; the CPU/heat problem the body actually documents is not. @OrcaWin's read above is correct and stands.
Fixed: "closed terminal tabs were restored after relaunch". #16752 makes a user close of a remote terminal tab durable — it records a client-local tombstone (src/shared/closed-terminal-tab-tombstones.ts), which remote-workspace-session-merge.ts uses to drop a tab the host still lists but this client watched the user close. It also fixes the tombstone map being stripped from the session schema on every launch, which is the part that specifically mattered for "after relaunch".
Not fixed — the actual subject of this report. Nine terminal-tab PRs landed and not one of them touches the code behind your three counters:
So there is no reason to expect your CPU numbers to move, and I would not want this closed on the strength of the tab fix.
The thread worth pulling is that all 2125 wedged-release events are on a single pane, and your webgl-atlas-reset reasons are all reveal-shaped (visibility-resume, settled-reveal, tab-reveal) while the park verdict for that same pane flips 3–11 times per second. A pane whose park verdict is flapping would be repeatedly hidden and revealed, each reveal re-uploading the glyph atlas and re-arming the replay guard — which would make the park churn the driver and the other two counters symptoms, rather than three separate faults. That is a hypothesis, not something I have confirmed.
If you can get onto an hourly build past these merges, a fresh main.trace.ndjson would be genuinely useful — my expectation is that the closed-tab restoration stops and all three counts stay where they are, and confirming that narrows this issue to the park/reveal loop.
Dug into the CPU/heat half. @OrcaWin's hypothesis holds — park churn is the driver, the WebGL atlas resets and the wedged replay guards are downstream of it. PR: #17009.
How I confirmed it. I found the same signature in a local 25-hour main.trace.ndjson, which let me look at the raw crumbs rather than just the counts:
terminal_park_verdict_churn x10 — every one for the SAME tabId
trigger=burst flips=3..6 elapsedMs=75..153 windowMs=1000 pinnedForMs=60000
Two things there settle it:
3–6 flips in 75–153 ms is 20–45 park/reveal flips per second on one pane — your "3–11 times within one second", worse.
The bursts recur 60 008 / 60 020 / 60 012 ms apart, which is exactly the pinnedForMs window. There is already a circuit breaker that pins a flapping tab unparked for 60 s after 3 flips in a second. It engages, goes quiet, expires, and the very next flip 8–31 ms later re-bursts. Some crumbs report flips: 6, which is only possible if flips kept accumulating while a pin was live.
So the brake was running but pressing on nothing. It was silencing its own warning light for 60 s at a time while the pane kept remounting underneath, which is why nine tab-related PRs could land without moving your numbers.
Atlas resets in my log came out visibility-resume 122 / settled-reveal 122 — a perfect 1:1 pair, matching your reason mix. And the replay guard fits mechanically: a reveal replays the buffer with a 10 s parse probe; if the pane is unmounted again before xterm drains, the write never parses and releases as wedged 10 s later. 2125 of those on one pane ≈ 2125 reveal→re-park cycles, at the ~170 ms flat remount cost the code itself cites — roughly 6 minutes of pure remount CPU, plus the churn of allocating and destroying a multi-megabyte terminal buffer 2000 times.
Root cause. The park verdict is worktree-level park OR per-tab cold park, plus a separate activation-deferred branch. The flip pin was counted on the combined verdict but applied only to the per-tab cold-park list, so a loop driven by the worktree-level verdict (or the deferred branch) short-circuited straight past it. The underlying flip is the known self-referential one: "can the byte watchers cover this tab once its pane is gone?" is answered from state that mounting or unmounting that same pane rewrites. The module's own docstring had already flagged the gap — "read a repeating burst crumb for one tab as 'damping did not reach the oscillating input'" — and a repeating burst crumb is precisely what your trace and mine both show.
Fix. Apply the pin to the rendered verdict rather than to one of its inputs, and expire pins for every live tab so damping lapses on its own instead of re-arming forever. On a deterministic repro: 400 flips / 200 pane mounts → 4 flips / 3 mounts, settled.
One thing I could not close out, honestly. This stops the remount thrash, but it does not remove the self-referential coverage predicate underneath. The breadcrumb records that the verdict flipped, not which input decided it, so I could not pin down from code reading alone which term flips for your SSH panes specifically. Carrying the deciding input in the crumb is the follow-up.
If you do get onto a build with #17009, a fresh main.trace.ndjson would be the clean confirmation: terminal_park_verdict_churn should stay at roughly a crumb a minute but terminal_replay_guard_wedged_release and the reveal-shaped webgl-atlas-reset counts should fall sharply, since they were paying for the flips that crumb was hiding. Thanks for the diagnostics — the three counters together are what made this findable.
The performance half of this report is now fixed — #17009, merged.
What was actually happening
The hypothesis in my earlier comment held: park churn was the driver, and the atlas resets and wedged replay guards were symptoms. But the real finding was sharper than that.
The loop was already known, it already had a brake, and the brake was wired to nothing.
The rendered verdict is coldParkTerminalPanes || (per-tab cold park), plus a separate activationDeferredMountTabIds branch (use-terminal-tab-cold-parking.ts:303). The existing flip pin filtered only the per-tab cold list, so a loop driven by the worktree-level verdict — the canWatcherCoverParkedTerminalTab veto at Terminal.tsx:1035-1046 — short-circuited straight past it. getParkVerdictUnparkPinUntilMs was cold-set-only for the same reason, which is why pins expired on a forever-60s cadence. The module's own docstring had predicted this exact failure mode.
Independent reproduction
Rather than working only from your counters, the same signature was found in a separate local 25h main.trace.ndjson, which gave raw crumbs instead of totals:
all churn events on one tab, trigger=burst, flips=3..6 in elapsedMs=75..153 → 20–45 flips/sec (worse than the 3–11 in your trace)
bursts recurring at 60008 / 60020 / 60012 ms — exactly pinnedForMs
some bursts reporting flips: 6, which is only possible if flips accumulated while a pin was live — the pin silenced its own breadcrumb and stopped nothing
visibility-resume 122 / settled-reveal 122, a perfect 1:1, matching your reveal-shaped reasons
Your 2125 wedged guards ≈ 2125 reveal→re-park cycles × the code's own ~170 ms flat remount ≈ 6 minutes of pure remount CPU, plus multi-MB glyph-buffer alloc/free ~2000×. That is the heat.
The fix
Apply the pin to the rendered verdict rather than one of its inputs, and expire pins for every live tab. Not a new threshold, not a debounce — the same already-derived brake, moved from an input to the actuator.
flips
pane mounts
renders
before
400
200
401 (hard stop)
after
4
3
6, settled
Honest limit
This stops the remount thrash. It does not remove the self-referential coverage predicate underneath. The breadcrumb records that the verdict flipped, not which input decided it, so the specific flipping term for your SSH panes could not be isolated from static reading. Attributing the driver in the crumb is the follow-up.
If you can get onto a build past this merge, a fresh main.trace.ndjson would confirm it directly — the expectation is terminal_park_verdict_churn collapsing toward zero and both terminal_replay_guard_wedged_release and webgl-atlas-reset falling with it. If they don't, that would be genuinely useful to know, because it would mean a second driver.
Closing on the strength of the reproduction and the measured numbers. Please reopen if your counters don't move.
Activity
OrcaWin commentedon Aug 18, 2026
Related to #12447 (closed SSH tabs resurrecting on reattach). Leaving this open: the title mentions restored closed tabs, but the body and diagnostics are a distinct heat/CPU issue (
terminal_replay_guard_wedged_release, WebGL atlas resets, park churn).nwparker commentedon Aug 18, 2026
We merged a few PRs related to this they just aren't released yet. Might solve the issues 🤔
If you can update to the latest hourly build, that'd tell us.
To see the above, OPTION click the update area
fix(terminal): a close the host never heard must survive the reconnect
fix(terminal): a close the host never heard must survive the reconnect
fix(terminal): a close the host never heard must survive the reconnect
fix(terminal): a close the host never heard must survive the reconnect (
nwparker commentedon Aug 28, 2026
Leaving this open. The one-line side note is fixed; the CPU/heat problem the body actually documents is not. @OrcaWin's read above is correct and stands.
Fixed: "closed terminal tabs were restored after relaunch". #16752 makes a user close of a remote terminal tab durable — it records a client-local tombstone (
src/shared/closed-terminal-tab-tombstones.ts), whichremote-workspace-session-merge.tsuses to drop a tab the host still lists but this client watched the user close. It also fixes the tombstone map being stripped from the session schema on every launch, which is the part that specifically mattered for "after relaunch".Not fixed — the actual subject of this report. Nine terminal-tab PRs landed and not one of them touches the code behind your three counters:
terminal_replay_guard_wedged_release×2125src/renderer/src/components/terminal-pane/replay-guard.tsterminal_webgl_diagnostic×950 (webgl-atlas-reset)src/renderer/src/lib/pane-manager/pane-manager-registry.tsterminal_park_verdict_churn×39src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.tsSo there is no reason to expect your CPU numbers to move, and I would not want this closed on the strength of the tab fix.
The thread worth pulling is that all 2125 wedged-release events are on a single pane, and your
webgl-atlas-resetreasons are all reveal-shaped (visibility-resume,settled-reveal,tab-reveal) while the park verdict for that same pane flips 3–11 times per second. A pane whose park verdict is flapping would be repeatedly hidden and revealed, each reveal re-uploading the glyph atlas and re-arming the replay guard — which would make the park churn the driver and the other two counters symptoms, rather than three separate faults. That is a hypothesis, not something I have confirmed.If you can get onto an hourly build past these merges, a fresh
main.trace.ndjsonwould be genuinely useful — my expectation is that the closed-tab restoration stops and all three counts stay where they are, and confirming that narrows this issue to the park/reveal loop.nwparker commentedon Aug 28, 2026
Dug into the CPU/heat half. @OrcaWin's hypothesis holds — park churn is the driver, the WebGL atlas resets and the wedged replay guards are downstream of it. PR: #17009.
How I confirmed it. I found the same signature in a local 25-hour
main.trace.ndjson, which let me look at the raw crumbs rather than just the counts:Two things there settle it:
pinnedForMswindow. There is already a circuit breaker that pins a flapping tab unparked for 60 s after 3 flips in a second. It engages, goes quiet, expires, and the very next flip 8–31 ms later re-bursts. Some crumbs reportflips: 6, which is only possible if flips kept accumulating while a pin was live.So the brake was running but pressing on nothing. It was silencing its own warning light for 60 s at a time while the pane kept remounting underneath, which is why nine tab-related PRs could land without moving your numbers.
Atlas resets in my log came out
visibility-resume122 /settled-reveal122 — a perfect 1:1 pair, matching your reason mix. And the replay guard fits mechanically: a reveal replays the buffer with a 10 s parse probe; if the pane is unmounted again before xterm drains, the write never parses and releases aswedged10 s later. 2125 of those on one pane ≈ 2125 reveal→re-park cycles, at the ~170 ms flat remount cost the code itself cites — roughly 6 minutes of pure remount CPU, plus the churn of allocating and destroying a multi-megabyte terminal buffer 2000 times.Root cause. The park verdict is
worktree-level park OR per-tab cold park, plus a separate activation-deferred branch. The flip pin was counted on the combined verdict but applied only to the per-tab cold-park list, so a loop driven by the worktree-level verdict (or the deferred branch) short-circuited straight past it. The underlying flip is the known self-referential one: "can the byte watchers cover this tab once its pane is gone?" is answered from state that mounting or unmounting that same pane rewrites. The module's own docstring had already flagged the gap — "read a repeatingburstcrumb for one tab as 'damping did not reach the oscillating input'" — and a repeating burst crumb is precisely what your trace and mine both show.Fix. Apply the pin to the rendered verdict rather than to one of its inputs, and expire pins for every live tab so damping lapses on its own instead of re-arming forever. On a deterministic repro: 400 flips / 200 pane mounts → 4 flips / 3 mounts, settled.
One thing I could not close out, honestly. This stops the remount thrash, but it does not remove the self-referential coverage predicate underneath. The breadcrumb records that the verdict flipped, not which input decided it, so I could not pin down from code reading alone which term flips for your SSH panes specifically. Carrying the deciding input in the crumb is the follow-up.
If you do get onto a build with #17009, a fresh
main.trace.ndjsonwould be the clean confirmation:terminal_park_verdict_churnshould stay at roughly a crumb a minute butterminal_replay_guard_wedged_releaseand the reveal-shapedwebgl-atlas-resetcounts should fall sharply, since they were paying for the flips that crumb was hiding. Thanks for the diagnostics — the three counters together are what made this findable.fix(terminal): damp park-verdict oscillation on the rendered verdict (#…
nwparker commentedon Aug 28, 2026
The performance half of this report is now fixed — #17009, merged.
What was actually happening
The hypothesis in my earlier comment held: park churn was the driver, and the atlas resets and wedged replay guards were symptoms. But the real finding was sharper than that.
The loop was already known, it already had a brake, and the brake was wired to nothing.
The rendered verdict is
coldParkTerminalPanes || (per-tab cold park), plus a separateactivationDeferredMountTabIdsbranch (use-terminal-tab-cold-parking.ts:303). The existing flip pin filtered only the per-tab cold list, so a loop driven by the worktree-level verdict — thecanWatcherCoverParkedTerminalTabveto atTerminal.tsx:1035-1046— short-circuited straight past it.getParkVerdictUnparkPinUntilMswas cold-set-only for the same reason, which is why pins expired on a forever-60s cadence. The module's own docstring had predicted this exact failure mode.Independent reproduction
Rather than working only from your counters, the same signature was found in a separate local 25h
main.trace.ndjson, which gave raw crumbs instead of totals:trigger=burst,flips=3..6inelapsedMs=75..153→ 20–45 flips/sec (worse than the 3–11 in your trace)pinnedForMsflips: 6, which is only possible if flips accumulated while a pin was live — the pin silenced its own breadcrumb and stopped nothingvisibility-resume122 /settled-reveal122, a perfect 1:1, matching your reveal-shaped reasonsYour 2125 wedged guards ≈ 2125 reveal→re-park cycles × the code's own ~170 ms flat remount ≈ 6 minutes of pure remount CPU, plus multi-MB glyph-buffer alloc/free ~2000×. That is the heat.
The fix
Apply the pin to the rendered verdict rather than one of its inputs, and expire pins for every live tab. Not a new threshold, not a debounce — the same already-derived brake, moved from an input to the actuator.
Honest limit
This stops the remount thrash. It does not remove the self-referential coverage predicate underneath. The breadcrumb records that the verdict flipped, not which input decided it, so the specific flipping term for your SSH panes could not be isolated from static reading. Attributing the driver in the crumb is the follow-up.
If you can get onto a build past this merge, a fresh
main.trace.ndjsonwould confirm it directly — the expectation isterminal_park_verdict_churncollapsing toward zero and bothterminal_replay_guard_wedged_releaseandwebgl-atlas-resetfalling with it. If they don't, that would be genuinely useful to know, because it would mean a second driver.Closing on the strength of the reproduction and the measured numbers. Please reopen if your counters don't move.
fix(terminal): a close the host never heard must survive the reconnect (
fix(terminal): damp park-verdict oscillation on the rendered verdict (s…
fix(terminal): a close the host never heard must survive the reconnect (
fix(terminal): damp park-verdict oscillation on the rendered verdict (s…