Repository navigation
Description
Operating system
Windows
Orca version
v1.4.188
Details
Short summary: On a 16 GB Windows laptop, 6–9 live Codex/Grok sessions plus their MCP children commit ~40 GB and hard-page the host. Orca's diagnostics and Resource Manager report working set only, so the UI looks like ~2 GB of agents while Task Manager / PrivateMemorySize64 show 13+ GB of codex.exe plus another ~9 GB of node.exe. Hibernation cannot save this layout: it is off by default, and even when enabled the planner skips the entire active worktree.
This is the Windows counterpart of the “Orca ate my RAM” reports on macOS (#9138, #9530, #7175), with numbers.
Host
- Windows 11 24H2 (build 26100), ASUS VivoBook M1605XA
- 16 GB RAM (2×8 GB DDR5-4800), both slots filled
- Orca 1.4.188, single
orca-terminal-daemongeneration (daemon-host\1.4.188) — not a stale-daemon pile-up - Four long-lived product worktrees left open on purpose (not throwaway task trees), each with 1–3 agent tabs
What the host was actually doing
Sample while the app was in normal use (not a stress test):
| Process | Count | Working set (Task Manager) | Private bytes |
|---|---|---|---|
codex.exe |
9 | 1.4 GB | 13.4 GB (one process 5.7 GB) |
node.exe |
47 | 5.3 GB | 9.2 GB (includes 2× astro build + 27× tavily-mcp) |
| Orca app tree | 9 | 1.3 GB | 1.7 GB |
python (AnySearch / askecho MCP) |
62 | 0.2 GB | 1.5 GB |
MsMpEng (Defender, secondary) |
1 | 0.6 GB | 0.8 GB |
Windows memory manager at the same moment:
- Physical: 15.2 GB total, 0.25 GB free
- Commit: 42 GB / 46 GB (~90%)
C:\pagefile.sys: 32 GB allocated, 20 GB in use- Pages/sec: 27k–38k (hard thrash; UI + disk stutter)
orca diagnostics memory --json reported processMemoryMetric: "working-set" and attributed ~3.4 GB to one worktree session that was a PTY shell sitting in front of a multi-GB Codex + MCP tree. The CLI text even warns “shared pages may repeat”; it does not warn that Windows working set hides private bytes sitting in the pagefile.
orca orchestration worker-list --json: 32 workers, all terminalState: "retained", 24 of them dispatchStatus: "completed". Same class as #13047.
Why this is an Orca bug, not “buy more RAM”
-
Wrong metric on Windows.
src/renderer/src/web/web-preload-api.tssetsprocessMemoryMetricto'working-set'onwin32.src/main/memory/windows-process-resource-collector.tsqueries onlyWin32_Process.WorkingSetSize(typeperf fallback:Working Set). Codex’s working set is 70–150 MB while private bytes are 0.5–5.7 GB. Resource Manager therefore cannot warn before the host is already paging. -
Session accounting stops at the PTY. Diagnostics memory is the shell PTY working set. It does not walk to
codex.exe/grok.exe/ MCP descendants. Users (and the app) conclude “Orca is only 1–2 GB” while the owned tree is 20+ GB committed. -
One MCP interpreter per live agent, then leftovers. 9 Codex sessions → 27
tavily-mcpnode processes and 26 AnySearch copies. That is expected while sessions are live (agents spawn their own MCP). After tabs are closed, copies remain — Windows descendant teardown does not reliably reap MCP (cmd.exe /c tavily-mcp→ node, and uv/python askecho). Same lifecycle class as [Bug]: Stale OMP sessions survive terminal close and keep eating memory (workers + Deno LSP) #9530 (OMP + Deno LSP), different binaries. -
Hibernation cannot drain this layout.
- Default:
experimentalAgentHibernation: false(src/shared/constants.ts). - This machine had it off.
- Planner (
src/renderer/src/lib/agent-hibernation-planner.ts) continues past the entireactiveWorktreeId, then also skips any tab inforegroundTerminalTabIds. A 16 GB user who keeps 3–4 product worktrees open, and works in one of them, never parks the done Codex panes in the tree they are looking at. Sibling-tab idle already exists for inactive worktrees (does not let one foreground terminal tab reset a sibling tab); the active tree does not get that treatment. - Interrupted sessions never auto-hibernate ([Bug]: Interrupted agent sessions are never auto-hibernated, and manual workspace sleep silently discards them on wake #11598).
- Default:
-
Orchestration retain. Completed workers stay as live terminals (
retained/legacy_ambiguous). On Windows that is a full Codex + MCP tree, not a cheap handle.
Related but distinct: #7175 (Windows “>3 sessions → Not responding” on 32 GB — likely the same paging/renderer collapse, not only xterm drain), #10768 (closed; the opposite failure mode — over-counting virtual size. Please do not “fix” this by summing private bytes into the existing memory field), #9138 (stale daemon generations; not this host — only 1.4.188 is running).
How to reproduce
- Windows host with 16 GB RAM (32 GB also shows it, just later).
- Open 4 worktrees, 2 agent tabs each (Codex or Grok), leave them open.
- Do real work so agents start MCP (tavily / python MCP is enough).
- Compare:
orca diagnostics memory --json- Task Manager working set
Get-Process codex,node | Select Name,WorkingSet,PrivateMemorySize64Get-CimInstance Win32_PageFileUsageGet-Counter '\Memory\Pages/sec'
- Close a subset of tabs. Re-count
tavily-mcp/pythonMCP. Many remain. orca orchestration worker-list --jsonafter a multi-worker run.
Expected
- Diagnostics / Resource Manager show both resident working set and private/commit for the PTY plus descendants, and host commit % / available RAM.
- Closing an agent tab kills the agent CLI and MCP descendants on Windows.
- Done, non-visible panes can hibernate even inside the active worktree; completed orchestration workers default to release.
- On a 16 GB host, creating a 3rd concurrent local Codex should warn that the machine will page (docs already quote ~2–4 GB per agent).
Proposed slices (happy to send PRs)
Please treat these as separate PRs; I can implement 1–2 if maintainers want them.
- Windows memory collector (bugfix, low risk if additive): query
PageFileUsage/ private bytes alongsideWorkingSetSize. Add a parallel field (privateMemory/committedMemory). Keep today'smemory= working set so we do not regress [Bug]: Orca attributes 54-120 GB to a 1.3 GB Next/Turbopack terminal and becomes unresponsive #10768. Surface hostCommitted Bytes/Commit Limitand available RAM. Warn in Resource Manager /diagnostics memorywhen physical available is low or commit > ~80%. - Walk descendant trees for session attribution (Codex/Grok/MCP), still without replacing the working-set sum.
- Hibernation: stop skipping the whole
activeWorktreeId; reuse the existing sibling-tab idle rule so done, non-foreground panes in the tree you are looking at can sleep. Keep foreground / visible-claim protection (registerVisibleTerminalTab). Consider default-on for hibernation on hosts with ≤32 GB, or a RAM-based default. - Windows descendant kill for MCP (
cmd.exe /c …, node, python/uv) when an agent tab closes — same acceptance as [Bug]: Stale OMP sessions survive terminal close and keep eating memory (workers + Deno LSP) #9530, plus Codex/Grok. - Orchestration: default
releasenotretainafter settle ([Bug]: Orchestration worker terminals stay open after settle (Done stack / retained legacy_ambiguous) — no auto-release #13047). - Concurrency budget: warn before the Nth local heavy agent on small hosts. Do not tell users to enlarge the pagefile — that turns OOM into silent disk thrash.
Anything else
I am not asking Orca to make 9 Codex fit in 16 GB. I am asking it to see the 13 GB of private Codex, park done panes in the worktree I am using, and reap MCP when a tab closes. Right now the only working workaround is “never keep more than two hot Codex tabs, and manually Sleep the other worktrees.”
Activity
sanshengai commentedon Aug 24, 2026
Implementation update: I split the measurable fixes into independent review units rather than duplicate PRs:
The Windows private/commit-memory collector and descendant-tree attribution remain separate follow-up slices; combining them into the lifecycle/cache changes would raise review and regression risk.
perf(sleep): park idle agents in the worktree you are working in (sta…
fix(memory): report the Windows number that predicts paging, not just…
perf(sleep): park idle agents in the worktree you are working in (sta…
fix(memory): report the Windows number that predicts paging, not just…
perf(sleep): park idle agents in the worktree you are working in (sta…
fix(memory): report the Windows number that predicts paging, not just…
cmungall commentedon Oct 2, 2026
I hit the same diagnostic blind spot on macOS today (October 2), on a machine with 64 GiB RAM.
macOS reported that the system had run out of application memory, but Orca Resource Manager showed only 8.03 GB Σ RSS overall. Two Codex processes were the main contributors:
vmmap -summary: malloc bytes allocatedvmmap -summary: malloc swapped columnThese measurements were taken close together, not as an atomic snapshot. The allocated figures are malloc-zone allocations, not a claim that each process occupied 42 GB of physical RAM. Ordinary process RSS was only around 2.2 GiB per process during an earlier sample.
System-level evidence:
hw.memsize: 68,719,476,736 bytes (64 GiB).vm.swapusagereported 64,335.62M used (~62.8 GiB).vm_statthen showed approximately 29 GiB of free RAM. Orca itself remained running; no workspaces were deleted.The processes were present in Resource Manager under the correct workspaces. The problem in this incident was the RSS-only metric, rather than missing process attribution: the UI made the two processes exhausting memory look relatively modest because most of their allocation was no longer resident.
Could the scope of this issue include macOS as well? Keeping RSS explicitly labeled is useful, but Resource Manager also needs a platform-appropriate footprint/compressed-memory measure alongside it, and host memory-pressure/swap information. These should remain separate metrics rather than being added into the existing RSS field.
This evidence does not establish why the Codex processes grew so large, or implicate an Orca allocation leak. It demonstrates that the current Resource Manager view was insufficient to identify the source of a real memory-exhaustion incident. I have screenshots and saved
vmmapsummaries from the incident.perf(sleep): park idle agents in the worktree you are working in (sta…
fix(memory): report the Windows number that predicts paging, not just…
giveortake commentedon Nov 19, 2026
Follow-up on the original scope: PR #16589 (
64c992cd56a) added a separately labelled Windows committed/private-bytes metric viaPageFileUsage(windows-process-resource-collector.ts:92,:101-102), which covers the working-set-only blind spot described in this report.The October comment broadened the request to macOS RSS-only exhaustion, which that fix does not address. Could maintainers confirm the Windows case is resolved and close this, tracking the macOS expansion separately?