[BUG] Headless CLI reserves memory from host RAM, leaks to 11-31 GB, and takes down the entire WSL2 VM (2.1.181 / 2.1.215 / 2.1.220)

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 3 comments · opened Aug 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code CLI grows to 11??1 GB anon-RSS and takes down the entire WSL2 VM

Version: 2.1.220 (also reproduced on 2.1.215 and 2.1.181)
Platform: WSL2 (WSL 2.7.8.0, kernel 6.18.33.1-microsoft-standard-WSL2), Ubuntu 24.04.1 LTS
Host: Windows 11, 63.4 GiB RAM; WSL2 VM allotted 31 GiB (default 50%) + 8 GiB swap
Install: ~/.local/bin/claude
Severity: Data-loss / availability ??kills every unrelated process in the VM, not just Claude Code

---

Summary

A claude process grows without bound until the kernel's global OOM killer fires. On WSL2 this does not merely kill Claude Code ??it takes down the whole Linux userspace, because every WSL process lives under init.scope and systemd ships init.scope with OOMPolicy=stop. One runaway claude therefore causes systemd to SIGKILL the entire scope: long-running servers, cron jobs, and every interactive shell.

For us this meant our production trading-research server and its ~24 scheduled jobs went down four separate times, twice in the last two days, with no operator action and no warning.

This is not a WSL misconfiguration. The amplification is WSL-specific, but the trigger is Claude Code allocating 11??1 GB of anonymous memory, and it has done so across three different releases spanning six weeks.

Evidence

Every OOM victim on this machine since the box was built is a Claude Code process. The process comm is Claude Code's own version string, which makes attribution unambiguous:

$ journalctl | grep 'Out of memory: Killed process'
Jun 18 23:48  Killed 7182  (2.1.181)  total-vm:42181228kB  anon-rss:30897600kB
Jun 18 23:50  Killed 7182  (2.1.181)  total-vm:42181228kB  anon-rss:30897600kB
Jun 18 23:52  Killed 7182  (2.1.181)  total-vm:42181228kB  anon-rss:30897600kB
Jul 23 21:06  Killed 19899 (2.1.215)  total-vm:42220944kB  anon-rss:30617664kB
Aug 01 02:23  Killed 26218 (2.1.220)  total-vm:21256856kB  anon-rss:14889024kB
Aug 02 04:54  Killed 6194  (2.1.220)  total-vm:21256664kB  anon-rss:11386560kB

$ claude --version
2.1.220 (Claude Code)

That is 30.9 GB and 30.6 GB of anonymous RSS on 2.1.181/2.1.215, and 11??5 GB on 2.1.220.

The footprint is not organic growth ??it is sized from host RAM

Note the total-vm figures: 42181228 vs 42220944 kB, and 21256856 vs 21256664 kB. Incidents weeks apart, in different sessions, land within 0.1% of the same virtual-memory size. That is not growth driven by a workload.

Cross-referencing #82188 (independent reporter, different machine, same 2.1.220) makes the pattern concrete:

| Report | Version | VM memory ceiling | observed total-vm | ratio |
|---|---|---|---|---|
| #82188 (J0E1464) | 2.1.220 | ~16 GB | 17,062,176 kB (16.3 GB) | ~1.02횞 |
| this report | 2.1.220 | 31 GB | 21,256,856 kB (20.3 GB) | ~0.65횞 |
| this report | 2.1.215 | 31 GB | 42,220,944 kB (40.3 GB) | ~1.30횞 |
| this report | 2.1.181 | 31 GB | 42,181,228 kB (40.2 GB) | ~1.30횞 |

Two things follow:

  1. The reserved size tracks available RAM, not the task. A bigger machine does not make this safer ??it makes the leak bigger. This is the signature of heap sizing derived from system memory (V8's default max-old-space-size heuristic, or an internal "fraction of RAM" budget) rather than a bounded working set.
  2. The ceiling changed between releases on identical hardware ??40.2 GB on 2.1.181/2.1.215 dropped to 20.3 GB on 2.1.220, same box, same 31 GB allotment. Something in the sizing path is version-dependent, which should make the allocation site straightforward to locate.

Because the value is near-deterministic per (version, host RAM), this looks reproducible rather than a rare race.

The kill cascade

Aug 02 04:54:26 kernel:  snapfuse invoked oom-killer: ... global_oom, task_memcg=/init.scope
Aug 02 04:54:26 kernel:  Out of memory: Killed process 6194 (2.1.220) anon-rss:11386560kB
Aug 02 04:55:56 systemd: init.scope: Killing process 659 (Relay)  with signal SIGKILL
Aug 02 04:55:56 systemd: init.scope: Killing process 660 (bash)   with signal SIGKILL
Aug 02 04:55:56 systemd: init.scope: Killing process 166039 (claude) with signal SIGKILL
Aug 02 04:55:56 systemd: init.scope: Failed with result 'oom-kill'.
Aug 02 04:55:56 systemd: init.scope: Consumed 28min 5.751s CPU time,
                                     29.8G memory peak, 7.9G memory swap peak.

29.8G memory peak, 7.9G swap peak ??Claude Code exhausted 31 GiB of RAM and all 8 GiB of swap in a 28-minute session.

Confirmed on this box:

$ systemctl show init.scope -p OOMPolicy
OOMPolicy=stop

Boot records show the resulting unclean VM terminations (no shutdown record between boots):

$ journalctl --list-boots | tail -3
 -2  ...  Fri 2026-07-24 07:20 EDT ??Sat 2026-08-01 02:25 EDT
 -1  ...  Sat 2026-08-01 04:06 EDT ??Sun 2026-08-02 04:56 EDT
  0  ...  Sun 2026-08-02 05:03 EDT ??(current)

Context

  • Invocation is headless/non-interactive: claude --print "/<skill>" --dangerously-skip-permissions, run from cron, per-attempt wall-clock timeout of 1200??800 s.
  • Sessions are long and tool-heavy (WebSearch/WebFetch, subagents, large file writes).
  • ~/.claude/projects is 982 MB; the largest single session transcript is 9.0 MB, with a 7.8 MB subagent transcript alongside it. If transcripts or subagent state are retained in-memory unbounded for the session's life, that is a plausible source.
  • A healthy foreground session on this box sits at ~490 MB RSS, so the failure mode is roughly 20??0횞 normal.

Expected behavior

  1. Claude Code should not allocate tens of gigabytes. If a session legitimately needs to grow, it should bound itself and fail its own request rather than the machine.
  2. Claude Code should ship a self-imposed memory ceiling (a documented --max-old-space-size default, or an internal high-water check that ends the turn cleanly).
  3. At minimum this should be documented for long-running/headless deployments, with a supported way to cap it.

Actual behavior

Unbounded growth to 11??1 GB, global OOM, and ??on WSL2 specifically ??destruction of every unrelated process in the VM.

Impact

Anyone running Claude Code headless on WSL2 alongside other services is exposed to total loss of that environment, triggered by Claude Code alone. The blast radius is not scoped to the agent. On this machine it repeatedly killed a production webapp and its full cron fleet in the middle of the night.

Reproduction

Not deterministic on demand, but observed 6 times across 3 releases over 6 weeks under: headless --print invocations of long, tool-heavy, subagent-spawning sessions on WSL2 with a large default memory allotment. Frequency has increased (Jun 18 ??Jul 23 ??Aug 1 ??Aug 2).

Related issues

Filing separately because the invocation path here is the headless claude --print cron agent across three releases over six weeks, and because the host-RAM scaling correlation above only becomes visible when these reports are read together. Happy to have this merged into whichever is canonical.

  • #82188 ??same init.scope cascade on WSL2, 2.1.220, background daemon. Closest match; the table above combines its numbers with ours.
  • #76185 ??headless -p session leaks to 10??5 GB RSS, Linux, 2.1.205.
  • #81343 ??single background subagent balloons to 9.5 GiB in ~100 s ??global kernel OOM, 2.1.220.
  • #70523 ??kernel OOM (not V8 heap) from parallel subagent fan-out, platform:wsl.
  • #4953 ??process grows to 120+ GB and gets OOM-killed, platform:linux.
  • #83204 ??VM-wide memory exhaustion on WSL2, 2.1.220.

The volume of open, independently-filed reports here is itself a signal: this is not an exotic configuration.

Questions

  1. Is there a supported memory ceiling for the CLI? Is NODE_OPTIONS=--max-old-space-size respected by the bundled runtime, and is it safe?
  2. Are session transcripts and subagent state held in memory for the session lifetime, and does ~/.claude/projects size feed back into resident memory?
  3. Why is total-vm near-identical across independent incidents (42.18/42.22 GB, then 21.257/21.257 GB)? That looks like a configured ceiling and may point straight at the allocation site.

Workaround we deployed

For anyone hitting this before it is fixed ??this contains the damage but does not fix the leak:

  1. Run every claude invocation inside a memory-capped transient cgroup (no root needed):

``bash
systemd-run --user --scope --quiet --collect \
-p MemoryMax=10G -p MemoryHigh=8G -p MemorySwapMax=2G \
-- claude --print "/skill" --dangerously-skip-permissions
`
This converts a machine-wide global OOM into a cgroup-local kill of
claude` alone, which normal retry logic then handles.

  1. Flip the WSL amplifier so one OOM stops killing everything else:

``bash
sudo mkdir -p /etc/systemd/system/init.scope.d
printf '[Scope]\nOOMPolicy=continue\n' | sudo tee /etc/systemd/system/init.scope.d/10-oom.conf
sudo systemctl daemon-reload
``

  1. Cap the VM in .wslconfig (memory=24GB, swap=16GB, autoMemoryReclaim=gradual) so a runaway cannot starve Windows itself.

What Should Happen?

Anyone running Claude Code headless on WSL2 alongside other services is exposed to total loss of that environment, triggered by Claude Code alone. The blast radius is not scoped to the agent. On this machine it repeatedly killed a production webapp and its full cron fleet in the middle of the night.

Error Messages/Logs

Steps to Reproduce

See the above

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.220(Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

3 Comments

Nuantic · 26 days ago

Third independent machine, and two details narrow this usefully: not WSL2, and not headless.

Environment: Claude Code 2.1.220 (native installer, autoUpdates: false), Proxmox/KVM VM, Ubuntu, 31 GiB RAM, systemd. Long-lived interactive tmux session under its own systemd unit, not --print. Zero MCP servers configured, which rules out the previously-fixed MCP leak family (2.1.132, 2.1.139, 2.1.208, 2.1.217). The leak still happens.

The total-vm correlation reproduces. Our kernel log, three kills in five days:

Jul 30 13:22:49  Killed process 1232559 (2.1.220)  total-vm:21256720kB  anon-rss:17183744kB
Aug 01 18:16:38  Killed process  922721 (2.1.220)  total-vm:23354256kB  anon-rss:21017984kB
Aug 03 15:52:03  Killed process 2724753 (2.1.220)  total-vm:23354064kB  anon-rss:19650176kB

Against the two in this report. Same version, same 31 GiB host RAM, different machines, different virtualisation:

| source | total-vm (kB) |
|---|---|
| this report | 21,256,856 |
| this report | 21,256,664 |
| ours (Proxmox VM, interactive) | 21,256,720 |

Three independent machines within 136 kB, or 0.0006%. Our other two kills sit on a second plateau matching each other to 0.0008%. Two stable plateaus, each under 0.001%, suggests two distinct sizing paths, and whatever computes them is not reading the workload.

2.1.221 does not fix it (no memory fix in its changelog).

A measurement warning for anyone else reporting this. On 2.1.221 the seat is a process tree: claude daemon run, bg-pty-host, bg-spare, forked sessions. Sampling the single launcher pid reports 499 MB here while the tree totals 2,111 MB across 9 processes, a 4x under-count. If you trend "claude RSS" from one pid you may watch a flat, healthy line while the daemon climbs. Walk the cgroup's cgroup.procs instead. Since #82188 is specifically a daemon leak, some existing measurements may be understating it.

Containment, and a gotcha inside it. Same cgroup workaround as above, but at unit level via a drop-in (MemoryHigh=12G, MemoryMax=16G), which applies to a running unit with systemctl daemon-reload and no restart. Verify by reading /sys/fs/cgroup/system.slice/<unit>/memory.max, not systemctl show.

Do not alarm on memory.current. It counts reclaimable page cache. Ours reads 11 GB while anon is 1.5 GB and file is 8.6 GB. We wired an early-warning on memory.current and it fired continuously against a completely healthy seat. Alarm on the anon line of memory.stat.

24 h after capping, memory.events reads high 436, max 0, oom_kill 0: the soft cap is reclaiming and nothing has died. Our kill cadence was 45 to 53 h, so that is one incomplete window, not a fix.

A healthy interactive seat here sits at ~450-500 MB RSS, so the kills run roughly 40x normal, consistent with the ~490 MB baseline reported above.

Happy to supply full OOM task dumps, or to run an instrumented build if that would help locate the allocation site.

*Posted by Sarge Marcelino. Figures copied verbatim from the host's kernel log.

dementiescholing-ux · 24 days ago

Independent confirmation on 2.1.219, from a host six times smaller than the ones reported here — 8 GB rather than ~46 GiB. The reason for posting is your unanswered question 3: what causes the near-identical total-vm across incidents? We measured that from the other end, without knowing this issue existed, and the numbers line up with your "heap sizing from system memory" hypothesis.

Everything below is measured on the machine. A raw sample series is attached at the bottom so every figure can be checked, including the ones that weaken the case.

Environment

  • Claude Code 2.1.219, bundled in claude-desktop 1.24012.11 (dpkg -s)
  • Ubuntu 26.04 LTS, kernel 7.0.0-28-generic
  • 4 vCPU, 8.1 GB / 7.6 GiB RAM, 4 GiB swap
  • 5–7 concurrent long-lived sessions, heavy tool use (sessions repeatedly read logs, status files and build output)

All times UTC.

1. total_vm tracks host RAM — a third data point, at a much smaller size

At the moment of the kill the kernel's process table listed eight processes named claude. Page size 4096 bytes; converted from the kernel's page counts:

pid        total_vm     rss     swap   rss+swap
2949998      4.27 GiB  3540 M      0 M   3540 M   <- killed
96473        5.74 GiB   221 M     66 M    287 M
109857       5.74 GiB   240 M     78 M    318 M
707958       5.74 GiB   194 M     73 M    267 M
1622871      5.74 GiB   110 M     26 M    137 M
1912572      5.74 GiB   304 M      0 M    304 M
2432146      5.74 GiB   245 M      0 M    245 M
2873662      5.74 GiB   241 M      0 M    241 M

Two things stand out against what is reported in this thread:

Seven independent sessions share total_vm of exactly 5.74 GiB — that is 75% of this host's 7.6 GiB. Your incidents show ~40.2 GiB and ~20.3 GiB on a ~46 GiB guest. Whatever sets this figure, it is not workload: these seven sessions were doing very different things, had been alive for between 7 minutes and 6 hours, and carried transcripts from 1.5 MB to 11 MB. Their resident sets range from 110 to 304 MB. The reservation does not move.

**The killed process had a different reservation: 4.27 GiB, not 5.74 GiB.** Same binary, same host, same moment — so it was started differently, not merely loaded more heavily. Its rss/total-vm ratio is 0.81, inside the 0.65–1.30 band in your table.

2. The killed process, and why our sampler never saw it

12:58:55Z  pid 2949998 (claude)  anon-rss 3,623,136 kB (3.46 GiB)  total-vm 4,477,844 kB
13:31:16Z  pid 3233935 (claude)  anon-rss 3,598,120 kB
13:31:40Z  pid 3235027 (claude)  anon-rss 3,567,272 kB

All three inside app-com.anthropic.Claude-8371.scope, all constraint=CONSTRAINT_NONE and global_oom. user.slice and user-1000.slice both report MemoryMax=infinity and MemoryHigh=infinity, and systemd-oomd is inactive, so these are host-wide kernel kills with no cap to hit. Only the first is free of intervention on our side; the two at 13:31Z fall inside the window in which we were shutting the app down.

No Electron process was killed. Every Electron process here carries comm=claude-desktop; claude is the session binary. claude-desktop appears in the OOM process tables but never as a victim.

Our sampler tracks only processes carrying --output-format, i.e. interactive agent sessions, and it recorded seven at that moment — one-for-one the same seven the kernel listed as survivors. The eighth, the one that was killed, it never saw at all, in any of 80 rounds. That is consistent with the triggers named in this issue: a headless --print invocation or a spawned subagent, neither of which carries that flag. We cannot confirm which; the process no longer exists.

It was not ballooning at the moment of death. The kernel produced two dumps 57 seconds apart (12:57:58Z and 12:58:55Z) and the process grew from 3524 MiB to 3540 MiB in between — 16 MB. It was already large. When it got there, we cannot say.

One detail that may matter for the ordering: the OOM was invoked by PID: 707958 Comm: claude, one of the ordinary sessions. A session asked for memory, could not get it, and the kernel then chose the largest process. The sessions were the trigger of the moment, not the size.

The kernel's oom_kill counter in /proc/vmstat stands at 36 for this boot. A poller recorded two rises: +11 at 12:58:59Z (entirely before any intervention of ours) and +6 at 13:31:44Z (inside our shutdown window).

3. On your unanswered question 2 — is session state held unbounded?

Partly, and it is slow rather than dramatic. Every long-running session grows steadily and never gives the memory back. Six sessions, 4.4–6.2 hours each, sampled every 10 minutes:

pid       samples  window (UTC)   memory        endpoint   fitted (r)    fitted >1h (r)
96473        37    07:20-13:29    198 -> 279 MB  13.1 MB/h  9.0 (0.79)    6.1 (0.68)
109857       36    07:30-13:29    226 -> 319 MB  15.5 MB/h  11.6 (0.75)   6.3 (0.56)
105998       32    07:20-12:36    229 -> 296 MB  12.7 MB/h  13.1 (0.85)   7.9 (0.73)
9294         28    10:38-15:23    261 -> 315 MB  11.4 MB/h  6.7 (0.47)    6.7 (0.47)
707958       28    08:50-13:29    220 -> 253 MB   7.1 MB/h  8.7 (0.76)    7.0 (0.59)
109728       27    07:30-11:56    235 -> 293 MB  13.1 MB/h  10.8 (0.72)   5.5 (0.44)

"endpoint" is (last − first) / window, the estimator most sensitive to noise. "fitted" is a least-squares slope. The third column excludes each session's first hour, because a process that has just started is still filling caches and that is warm-up, not retention. Excluding warm-up, all six land between 5.5 and 7.9 MB/h. The argument is the consistency across six independent sessions, not the precision of any one fit.

Session 9294 is the control. It was already 4.5 hours old at its first sample (age 16,154 s), so it lies entirely outside any start-up phase — which is why its fitted and fitted-\>1h figures are identical. A session that cannot be warming up grows at the same rate as the five that could. It also ran on a different day from the other five, so the growth tracks session age rather than time of day.

And the transcript does not explain it. Across all 267 rows with a valid transcript size, the correlation between transcript bytes and memory is r = 0.235. Session 9294 carries a 24–25 MB transcript while sitting at 254–331 MB — the same band as sessions with 4–11 MB transcripts. So if something is retained for the lifetime of a session, it is not simply the transcript.

What weakens this, stated up front: consecutive samples of the same session differ by a median of 7 MB, p90 24 MB, p95 32 MB, with one outlier of 85 MB. At ~6–8 MB/h the trend is invisible over 40 minutes and only separates from the noise over hours — anyone sampling briefly will reasonably conclude the memory is flat. Sessions also dip below their own starting value (9294 did so six times), and a short-lived session went down: pid 1622871, 168 MB to 133 MB over 2.7 hours.

4. An independent check on our sampler

The kernel's table doubles as verification of the measurement above, from a source we did not build. Kernel rss+swap at 12:58:55Z against our own sample two minutes earlier:

pid        our sample   kernel rss+swap
109857        320 MB        318 M
96473         291 MB        287 M
707958        263 MB        267 M
1912572       299 MB        304 M
2432146       242 MB        245 M
1622871       133 MB        137 M
2873662       287 MB        241 M   <- 46 MB apart, the one outlier

Six of seven agree within 5 MB. The outlier is the youngest process in the table — 440 seconds old, while all others had run for hours — i.e. the same start-up phase excluded above; eleven minutes later it read 245 MB against the kernel's 241 MB.

Impact and what the mitigations buy

The practical failure mode here was not a crash message: the desktop app's main window disappeared entirely while the sessions kept working. xwininfo showed no main window left on the X server, only a 200×200 and a 10×10 helper. No Electron process was OOM-killed, so we cannot show why the renderer went; the timing fits an allocation failure during the same episode and we are not claiming more than that. Restarting the app returned the memory: used 3.9 GB → 1.7 GB, available 3.7 GB → 5.9 GB.

Recycling sessions before they get heavy addresses section 3 and does nothing for the killed process. Using the attached series: samples from sessions younger than 15 minutes (n=45) have a median of 229 MB; older than 4 hours (n=72), 289 MB. So recycling recovers roughly 60 MB per session, about 360 MB across six — against a single process holding 3.46 GiB that the sampler cannot even see. We have adopted the MemorySwapMax half of the cgroup workaround posted in this thread and will add MemoryMax.

What would help

  • Which invocation sets a total_vm different from the 5.74 GiB the interactive sessions share? That single answer would identify the process class involved.
  • Is per-session memory expected to be released at any point during a session's life?
  • Are large tool results retained for the lifetime of a session? The transcript size does not track the memory, so if something is retained it is not the transcript.

<details>
<summary>Raw sample series — 359 rows, 80 rounds, tab-separated (click to expand)</summary>

Columns: epoch (Unix seconds, UTC) · pid · age_s (session age in seconds) · mem_MB (private process memory, MB) · transcript_bytes.

transcript_bytes is -1 where the size could not be determined — 92 of the 359 rows; those rows still carry a valid mem_MB. The sampler did not run continuously: there is a 12-hour overnight gap and one 81-minute gap. The final round (epoch 1786023590, 13:39Z) contains six brand-new pids at 170–194 MB with ages of 227–329 seconds — those are the sessions restarted after the incident, not a sudden drop, and they are absent from the six-session table above.

epoch	pid	age_s	mem_MB	transcript_bytes
1785926338	17867	15959	312	10955743
1785926338	879567	2316	270	-1
1785926338	881842	2263	251	-1
1785926338	9294	16154	261	24322795
1785926338	960875	1231	243	-1
1785926982	879567	2960	252	-1
1785926982	881842	2907	254	-1
1785926982	9294	16798	273	24396886
1785926982	960875	1875	250	-1
1785927625	1112878	566	242	-1
1785927625	879567	3603	267	-1
1785927625	881842	3550	268	-1
1785927625	9294	17441	274	24499040
1785927625	960875	2518	249	-1
1785928251	1112878	1192	255	-1
1785928251	879567	4229	277	-1
1785928251	881842	4176	262	-1
1785928251	9294	18067	254	24550355
1785928251	960875	3144	258	-1
1785928883	1112878	1824	253	-1
1785928883	879567	4861	272	-1
1785928883	881842	4808	262	-1
1785928883	9294	18699	262	24564495
1785928883	960875	3776	259	-1
1785929518	1112878	2459	258	-1
1785929518	879567	5496	286	-1
1785929518	881842	5443	262	-1
1785929518	9294	19334	289	24615216
1785929518	960875	4411	256	-1
1785930147	1112878	3088	271	-1
1785930147	1349754	380	229	2336659
1785930147	879567	6125	282	-1
1785930147	9294	19963	289	24615216
1785930147	960875	5040	260	-1
1785930764	1112878	3705	277	-1
1785930764	1349754	997	249	2544164
1785930764	879567	6742	281	-1
1785930764	9294	20580	331	24693309
1785930764	960875	5657	263	-1
1785931396	1112878	4337	271	-1
1785931396	1349754	1629	250	2694469
1785931396	879567	7374	271	-1
1785931396	9294	21212	264	24733183
1785931396	960875	6289	271	-1
1785932022	1112878	4963	278	-1
1785932022	1349754	2255	238	2854639
1785932022	9294	21838	264	24733183
1785932022	960875	6915	267	-1
1785932659	1112878	5600	300	-1
1785932659	1349754	2892	237	2854639
1785932659	9294	22475	264	24733183
1785932659	960875	7552	267	-1
1785933289	1112878	6230	314	-1
1785933289	1776802	209	230	3029369
1785933289	1782027	172	212	2954640
1785933289	9294	23105	258	24829397
1785933289	960875	8182	268	-1
1785933907	1112878	6848	303	-1
1785933907	1776802	827	236	3183075
1785933907	1782027	790	241	3116570
1785933907	9294	23723	277	24862853
1785933907	960875	8800	272	-1
1785934549	1112878	7490	297	-1
1785934549	1776802	1469	251	3329875
1785934549	1782027	1432	236	3299509
1785934549	9294	24365	256	24899364
1785934549	960875	9442	292	-1
1785935178	1112878	8119	319	-1
1785935178	1776802	2098	240	3465917
1785935178	1782027	2061	243	3462747
1785935178	9294	24994	256	24899364
1785935178	960875	10071	268	-1
1785935814	1112878	8755	297	-1
1785935814	1776802	2734	240	3465917
1785935814	1782027	2697	259	3586526
1785935814	9294	25630	256	24899364
1785935814	960875	10707	287	-1
1785936452	1112878	9393	297	-1
1785936452	1782027	3335	242	3586526
1785936452	9294	26268	256	24899364
1785936452	960875	11345	266	-1
1785937093	9294	26909	285	24899364
1785937745	9294	27561	285	24899364
1785938374	9294	28190	285	24899364
1785938995	9294	28811	285	24899364
1785939614	9294	29430	285	24899364
1785940244	9294	30060	284	24991690
1785940889	2498941	230	202	-1
1785940889	2499051	207	207	3342480
1785940889	9294	30705	286	25028360
1785941524	2498941	865	201	-1
1785941524	2499051	842	207	3342480
1785941524	9294	31340	285	25028360
1785942148	9294	31964	315	25028360
1785942774	9294	32590	315	25028360
1785943413	9294	33229	315	25028360
1785944814	2871989	2	304	25028581
1785945452	2871989	640	309	25028581
1785946066	2871989	1254	309	25028581
1785950936	3449225	20	302	25028581
1785951575	3449225	659	217	25070498
1785951575	3461417	554	210	3435240
1785951575	3465333	512	230	525170
1785952192	3449225	1276	218	25093080
1785952192	3461417	1171	215	3512027
1785952192	3465333	1129	242	792992
1785952192	3555900	198	231	3697000
1785952799	3449225	1883	219	25108156
1785952799	3461417	1778	234	3617725
1785952799	3465333	1736	252	1094059
1785952799	3555900	805	235	3891663
1785953401	3449225	2485	219	25108156
1785953401	3461417	2380	218	3687106
1785953401	3465333	2338	251	1327604
1785953401	3555900	1407	254	4112518
1785954062	3461417	3041	228	3839753
1785954062	3465333	2999	259	1591426
1785954062	3555900	2068	240	4338426
1785954062	3773543	160	201	25124827
1785954664	3461417	3643	232	3913014
1785954664	3465333	3601	289	1682376
1785954664	3555900	2670	258	4542689
1785954664	3773543	762	202	25124827
1785955289	3461417	4268	250	3968592
1785955289	3465333	4226	267	1827794
1785955289	3555900	3295	258	4691116
1785955934	3465333	4871	258	1857478
1785955934	3555900	3940	243	4705300
1785999598	4164727	28	298	25125045
1786000201	4164727	631	315	25138900
1786000801	105998	1	229	4711973
1786000801	4164727	1231	238	25175514
1786000801	96473	68	198	3992232
1786001404	105998	604	242	4898355
1786001404	109728	583	235	2123984
1786001404	109857	563	226	3655634
1786001404	4164727	1834	267	25199119
1786001404	96473	671	231	4099139
1786002006	105998	1206	231	4924811
1786002006	109728	1185	253	2236670
1786002006	109857	1165	238	3833405
1786002006	4164727	2436	221	25230348
1786002006	96473	1273	237	4221195
1786002639	105998	1839	239	5025852
1786002639	109728	1818	257	2378614
1786002639	109857	1798	236	3987473
1786002639	4164727	3069	222	25272140
1786002639	96473	1906	250	4334367
1786003244	105998	2444	255	5462924
1786003244	109728	2423	260	2523695
1786003244	109857	2403	252	4166844
1786003244	4164727	3674	222	25311645
1786003244	96473	2511	248	4501480
1786003845	105998	3045	262	5681672
1786003845	109728	3024	271	2681618
1786003845	109857	3004	250	4233659
1786003845	4164727	4275	235	25387311
1786003845	96473	3112	255	4708605
1786004446	105998	3646	274	5961809
1786004446	109728	3625	261	2856596
1786004446	109857	3605	275	4409547
1786004446	4164727	4876	236	25497498
1786004446	96473	3713	249	4906919
1786005048	105998	4248	272	6150556
1786005048	109728	4227	261	3134870
1786005048	109857	4207	269	4592810
1786005048	4164727	5478	258	25596995
1786005048	96473	4315	250	5163517
1786005651	105998	4851	279	6358106
1786005651	109728	4830	279	3312035
1786005651	109857	4810	296	4765061
1786005651	96473	4918	271	5451081
1786006253	105998	5453	276	6574872
1786006253	109728	5432	277	3491125
1786006253	109857	5412	341	4924718
1786006253	707958	601	220	-1
1786006253	773490	86	218	-1
1786006253	96473	5520	254	5636762
1786006855	105998	6055	273	6708776
1786006855	109728	6034	315	3635257
1786006855	109857	6014	266	5036224
1786006855	707958	1203	226	-1
1786006855	773490	688	233	-1
1786006855	96473	6122	262	5938974
1786007485	105998	6685	284	6828481
1786007485	109728	6664	288	3851511
1786007485	109857	6644	328	5135125
1786007485	707958	1833	236	-1
1786007485	773490	1318	245	-1
1786007485	96473	6752	257	6177593
1786008119	105998	7319	290	6989942
1786008119	109728	7298	314	4027479
1786008119	109857	7278	310	5256854
1786008119	707958	2467	231	-1
1786008119	773490	1952	247	-1
1786008119	96473	7386	266	6385056
1786008740	105998	7940	293	7264410
1786008740	109728	7919	292	4200687
1786008740	109857	7899	283	5576501
1786008740	707958	3088	230	-1
1786008740	773490	2573	262	-1
1786008740	96473	8007	260	6584510
1786009378	105998	8578	282	7437655
1786009378	109728	8557	294	4410064
1786009378	109857	8537	303	5921329
1786009378	707958	3726	245	-1
1786009378	773490	3211	260	-1
1786009378	96473	8645	268	6812530
1786010000	105998	9200	292	7660891
1786010000	109728	9179	302	4660771
1786010000	109857	9159	280	6151243
1786010000	707958	4348	235	-1
1786010000	773490	3833	260	-1
1786010000	96473	9267	288	7057297
1786010626	105998	9826	285	7864667
1786010626	109728	9805	309	4908921
1786010626	109857	9785	306	6535149
1786010626	707958	4974	237	-1
1786010626	773490	4459	262	-1
1786010626	96473	9893	270	7295618
1786011268	105998	10468	299	8093800
1786011268	109728	10447	296	5102430
1786011268	109857	10427	294	6817998
1786011268	707958	5616	237	-1
1786011268	773490	5101	265	-1
1786011268	96473	10535	265	7518550
1786011899	105998	11099	296	8332940
1786011899	109728	11078	301	5291232
1786011899	109857	11058	310	7122234
1786011899	707958	6247	252	-1
1786011899	773490	5732	255	-1
1786011899	96473	11166	281	7742680
1786012531	105998	11731	306	8592168
1786012531	109728	11710	303	5461775
1786012531	109857	11690	300	7440120
1786012531	707958	6879	245	-1
1786012531	773490	6364	256	-1
1786012531	96473	11798	265	7876243
1786013162	105998	12362	304	8797579
1786013162	109728	12341	295	5653090
1786013162	109857	12321	298	7685539
1786013162	1622871	400	168	1454437
1786013162	707958	7510	246	-1
1786013162	96473	12429	286	8029078
1786013782	105998	12982	296	9005222
1786013782	109728	12961	302	5833903
1786013782	109857	12941	306	7936492
1786013782	1622871	1020	134	1516957
1786013782	1689828	554	259	3049535
1786013782	707958	8130	247	-1
1786013782	96473	13049	287	8194061
1786014385	105998	13585	310	9217371
1786014385	109728	13564	288	6083951
1786014385	109857	13544	300	8146900
1786014385	1622871	1623	134	1563736
1786014385	1689828	1157	256	3049535
1786014385	707958	8733	259	-1
1786014385	96473	13652	292	8332810
1786014987	105998	14187	308	9383036
1786014987	109728	14166	294	6436869
1786014987	109857	14146	299	8439081
1786014987	1622871	2225	138	1698636
1786014987	1912572	222	260	3121843
1786014987	707958	9335	253	-1
1786014987	96473	14254	286	8527854
1786015591	105998	14791	297	9532345
1786015591	109728	14770	302	6704399
1786015591	109857	14750	299	8666871
1786015591	1622871	2829	137	1780921
1786015591	1912572	826	274	3485869
1786015591	707958	9939	243	-1
1786015591	96473	14858	299	8763804
1786016194	105998	15394	326	9590577
1786016194	109728	15373	301	6991665
1786016194	109857	15353	309	8950017
1786016194	1622871	3432	137	1879799
1786016194	1912572	1429	293	3710761
1786016194	707958	10542	253	-1
1786016194	96473	15461	298	8965034
1786016795	105998	15995	326	9696556
1786016795	109728	15974	293	7162208
1786016795	109857	15954	305	9160414
1786016795	1622871	4033	136	1953218
1786016795	1912572	2030	288	3897999
1786016795	707958	11143	255	-1
1786016795	96473	16062	292	9157500
1786017399	105998	16599	294	9827258
1786017399	109728	16578	293	7162208
1786017399	109857	16558	314	9416971
1786017399	1622871	4637	136	2053247
1786017399	1912572	2634	297	4046928
1786017399	707958	11747	289	-1
1786017399	96473	16666	296	9342400
1786018001	105998	17201	302	9861054
1786018001	109857	17160	309	9633323
1786018001	1622871	5239	136	2156388
1786018001	1912572	3236	282	4294241
1786018001	707958	12349	270	-1
1786018001	96473	17268	283	9523249
1786018605	105998	17805	299	9933147
1786018605	109857	17764	313	9822106
1786018605	1622871	5843	133	2284169
1786018605	1912572	3840	238	4368051
1786018605	2432146	76	227	7245358
1786018605	707958	12953	259	-1
1786018605	96473	17872	277	9836778
1786019206	105998	18406	296	9989305
1786019206	109857	18365	321	10006193
1786019206	1622871	6444	133	2407289
1786019206	1912572	4441	243	4519157
1786019206	2432146	677	242	7463249
1786019206	707958	13554	253	-1
1786019206	96473	18473	278	10079298
1786019808	105998	19008	296	9989305
1786019808	109857	18967	320	10145973
1786019808	1622871	7046	133	2554390
1786019808	1912572	5043	269	4700878
1786019808	2432146	1279	275	7685895
1786019808	707958	14156	277	-1
1786019808	96473	19075	278	10268475
1786020410	109857	19569	323	10336134
1786020410	1622871	7648	133	2679182
1786020410	1912572	5645	275	4889705
1786020410	2432146	1881	254	7897055
1786020410	707958	14758	280	-1
1786020410	96473	19677	281	10485769
1786021012	109857	20171	320	10500824
1786021012	1622871	8250	133	2824727
1786021012	1912572	6247	299	5047926
1786021012	2432146	2483	242	7982824
1786021012	2873662	440	287	-1
1786021012	707958	15360	263	-1
1786021012	96473	20279	291	10770733
1786021664	109857	20823	323	10677795
1786021664	1622871	8902	133	2867227
1786021664	1912572	6899	267	5212756
1786021664	2432146	3135	242	7982824
1786021664	2873662	1092	245	-1
1786021664	707958	16012	253	-1
1786021664	96473	20931	284	10981304
1786022325	109857	21484	323	10830154
1786022325	1622871	9563	133	2867227
1786022325	1912572	7560	265	5659768
1786022325	2873662	1753	266	-1
1786022325	707958	16673	253	-1
1786022325	96473	21592	276	11120701
1786022984	109857	22143	319	11028004
1786022984	1622871	10222	133	2867227
1786022984	1912572	8219	276	6073632
1786022984	2873662	2412	282	-1
1786022984	3149910	528	272	8104982
1786022984	707958	17332	253	-1
1786022984	96473	22251	279	11314076
1786023590	3256880	329	170	2878128
1786023590	3266764	241	175	11336753
1786023590	3268584	237	176	6123642
1786023590	3270036	234	178	8105325
1786023590	3271295	231	194	11038372
1786023590	3271745	227	172	1532558

</details>

Nuantic · 7 days ago

Follow-up from the third machine (Proxmox/KVM, interactive, not WSL2 and not headless) that
reported here on 2026-08-04. We have not reproduced it in 20 days. Below is a 53-hour run with
per-5-minute RSS sampling, including the parts that weaken the claim.

What changed on our side

Nothing in workload. Same box, same long-lived interactive tmux session under its own systemd unit,
same heavy tool use, still zero MCP servers.

Versions since our report: 2.1.220 → 2.1.236 → 2.1.237 → 2.1.238 → 2.1.239 → 2.1.240.

The measurement

Last three OOM kills, all on 2.1.220, all before we started sampling:

Jul 30 13:22:49  Killed process 1232559  total-vm:21256720kB  anon-rss:17183744kB
Aug 01 18:16:38  Killed process  922721  total-vm:23354256kB  anon-rss:21017984kB
Aug 03 15:52:03  Killed process 2724753  total-vm:23354064kB  anon-rss:19650176kB

Cadence was 45–53 hours.

Most recent long run, on 2.1.238:

started  2026-08-21T21:48:48Z
ended    2026-08-24T03:17:37Z
runtime  53h 29m
samples  643 (5-minute interval)
build    2.1.238  (read from /proc/<pid>/exe, recorded per-sample)
RSS      378 MB first sample -> 383 MB peak -> 201 MB last

Three things about that run are worth separating:

  1. It reached 53h 29m — the top of the old 45–53h kill window — and was not killed.
  2. Peak RSS was 383 MB, against kills at 17–21 GB. Roughly 2% of the old footprint.
  3. RSS ended lower than it started (383 MB peak, 201 MB at the final sample). Whatever the shape

of this workload, memory was being returned, not accumulated. That is the opposite of the
signature we reported in August.

The process was not killed. We restarted it deliberately because the model context window was
nearly full — an unrelated reason, from the layer above. So 53h 29m is a floor on what it would have
survived, not a ceiling.

Zero OOM kills on this host since 2026-08-03.

The confound, stated plainly

On 2026-08-03 we also set MemoryHigh=12G and MemoryMax=16G on the unit. That is exactly the kind
of change that can hide a leak rather than fix it, so here is the cgroup counter:

low 0
high 70044
max 0
oom 0
oom_kill 0
oom_group_kill 0

The hard cap never fired. max 0 and oom_kill 0 mean the process was never once contained by
the ceiling we added — there was nothing to contain. The high events are page-cache reclaim, which
we measured separately in August: at an apparent 11 GB the split was anon 1.5 GB / file 8.6 GB, of
which 7.3 GB inactive_file. A seat that reads and writes this many files accrues gigabytes of
droppable cache that can never cause an OOM. The caps are not what is keeping the number low.

The changelog entries that look related

2.1.238 — Fixed unbounded memory growth in long interactive sessions: subagent tool results are now released once they leave the recent display window

That matches this issue's profile closely: long interactive sessions, retention rather than
allocation. 2.1.239 also carries Fixed WebFetch retaining expired page content in memory for the
whole session instead of the intended 15 minutes
, which is the same shape.

Our 53h run above ran on 2.1.238, and that version is recorded per-sample from /proc/<pid>/exe
rather than inferred. An earlier clean 45h run was on 2.1.236, i.e. before the 2.1.238 entry — so
we cannot attribute the improvement to that changelog line. Either something landed earlier than
2.1.238, or our improvement has a different cause. We cannot separate those from here.

What this is NOT evidence of

  • Not evidence for WSL2 hosts. We are not on WSL2 and never were.
  • Not evidence for the headless/--print path or the background daemon in #82188. Ours is interactive.
  • Not a claim the issue should be closed. One host going quiet is one data point.
  • We cannot rule out that our own usage pattern shifted in a way we did not track.

Posting it because the opposite result — a machine that used to die every two days and now runs past
that window at 2% of the footprint — seems worth having in the thread alongside the reproductions,
and because the sampler lets us put numbers on "it stopped" instead of an impression.

Happy to share the sampler script or the raw TSV if either would help.