Summary
Both Windows workstations leak kernel Token objects. Each process that creates a child, while a foreground-lock condition holds, leaves one dead primary token behind until reboot.
Numbers
| host |
build |
uptime |
Token objects |
token-family pool |
spawn floor |
| melo-desk-001 (#3715) |
26200.x |
2 d |
3,811,482 |
paged pool 9.9 GB total |
cmd 1.3 to 1.6 s (14 ms after reboot) |
| melo-lap-001 (2026-09-23) |
26200.9457 |
69 h |
512,049 (about 2.1/s since boot) |
Toke 1,062 MB + Se* about 360 MB = about 1.4 GB |
bash 10 ms, cmd 10 ms: no penalty yet |
The melo-lap-001 pool tags come from an unelevated SystemPoolTagInformation read:
Measured leak per spawn
melo-lap-001, N=300 per row, quiet host. Idle-window SD was 18 per 60 s.
| command |
child-creating processes |
leaked tokens / spawn (±band) |
usr/bin/bash -c true |
0 |
0.00 (±0.13) |
usr/bin/bash -c /usr/bin/true |
1 |
1.04 (±0.13) |
usr/bin/bash -c 'x=$(:); (:)' |
1 |
1.04 (±0.14) |
usr/bin/bash -c 2 externals |
2 |
2.15 (±0.15) |
usr/bin/bash -c 5 externals |
6 |
5.95 (±0.18) |
cmd /c "cmd /c exit 0" |
1 |
0.96 (±0.14) |
Git cmd/git.exe, Git bin/bash.exe (launchers) |
1 |
0.99, 1.01 |
gh --version |
1 |
0.98 |
Leaked tokens equal the number of processes that created a child. Which binary it is does not matter.
Open question: when is it armed?
- Prediction: live
ForegroundLockTimeout is 2147483647, and bentoner's model says the leak is always armed at that value.
- Observed here: known creators leaked 1.0 each after 10 to 32 min with no user input, and about 0 to 0.24 when input was recent.
- Live sample: a 10 min window with about 4 creators per second showed a net change of 0.
This rests on three conditions and is confounded with time. If it holds, the leak runs hardest during unattended loops and overnight. The operator A/B (typing, hands-off, screen locked) is listed under Next actions.
Config-side levers (per unit, measured)
- External commands: each one in a bash hook, statusline, or Bash-tool script adds 1 token. Builtins, subshells and
$(...) add nothing beyond bash's own 1.
- Launcher shims: Git
bin/bash.exe, Git cmd/git.exe, and the uv python.exe trampoline each add 1. Use usr/bin/bash.exe and mingw64/bin/git.exe directly.
- Exec-form hooks: a hook running a binary that spawns nothing adds 0.
- ollama tray app: it respawns
ollama.exe about 0.5 times per second, about 13% of observed creators.
Next actions (operator)
Upstream
🤖 Generated with Claude Code
Summary
Both Windows workstations leak kernel Token objects. Each process that creates a child, while a foreground-lock condition holds, leaves one dead primary token behind until reboot.
Cause: a Windows kernel defect. Public trace:
win32kfull!CForegroundLaunch::_CheckAllowForeground(bentoner/windows-token-leak).Upstream status: Microsoft has no acknowledgement or fix through 26200.9550 (KB5124010, 2026-09-22).
Not the cause: neither Claude Code nor our configuration.
Amplifiers: leaked tokens grow linearly with the number of child-creating processes. Ours are Claude Code hooks, the statusline, Bash-tool calls, the CI runner, and the ollama tray app.
Prior capture on melo-desk-001: perf(host): melo-desk-001 process creation costs 1.4 to 4 s system-wide; 3.81M leaked kernel Token objects (~10 GB paged pool) since boot #3715.
Runbook:
plugins/claude-ops/skills/audit-performance/reference/known-performance-issues.md, section "The host-level floor: a kernel Token-object leak".Numbers
cmd1.3 to 1.6 s (14 ms after reboot)Toke1,062 MB +Se*about 360 MB = about 1.4 GBThe melo-lap-001 pool tags come from an unelevated
SystemPoolTagInformationread:WC*is about 0 andNtFCis under 1 MB.Measured leak per spawn
melo-lap-001, N=300 per row, quiet host. Idle-window SD was 18 per 60 s.
usr/bin/bash -c trueusr/bin/bash -c /usr/bin/trueusr/bin/bash -c 'x=$(:); (:)'usr/bin/bash -c2 externalsusr/bin/bash -c5 externalscmd /c "cmd /c exit 0"cmd/git.exe, Gitbin/bash.exe(launchers)gh --versionLeaked tokens equal the number of processes that created a child. Which binary it is does not matter.
Open question: when is it armed?
ForegroundLockTimeoutis 2147483647, and bentoner's model says the leak is always armed at that value.This rests on three conditions and is confounded with time. If it holds, the leak runs hardest during unattended loops and overnight. The operator A/B (typing, hands-off, screen locked) is listed under Next actions.
Config-side levers (per unit, measured)
$(...)add nothing beyond bash's own 1.bin/bash.exe, Gitcmd/git.exe, and the uvpython.exetrampoline each add 1. Useusr/bin/bash.exeandmingw64/bin/git.exedirectly.ollama.exeabout 0.5 times per second, about 13% of observed creators.Next actions (operator)
poolmon /iTokeandpoolmon /iWC*, with/gfor the driver column. perf(host): melo-desk-001 process creation costs 1.4 to 4 s system-wide; 3.81M leaked kernel Token objects (~10 GB paged pool) since boot #3715 missed this capture.bash_5extarm bracketed by null arms) to settle when the leak is armed.ForegroundLockTimeout=0(bentoner's workaround). Defer until the A/B is done; it lets any application steal focus.Upstream
🤖 Generated with Claude Code