Skip to content

feat(diag): each process's memory every 5 minutes, and mem-high past 2 GB (core 0.40.10) - #232

Merged
Maxaubert merged 2 commits into
mainfrom
feat/mem-watch
Oct 16, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
feat/mem-watch

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Owner, 2026-10-16: "do these" (the second follow-up to that night's frozen Claude tabs).

Why: the Stable copy's page process grew to 15.9 GB overnight (the #230 repaint loop) and nothing in the diagnostics log said so; it took a live look at the process list. A leak should be visible in the log long before it hurts.

What

  • core/main/memWatch.ts: every 5 minutes a memory crumb with each kind of process's private memory (mainMb, pageMb, gpuMb, otherMb, from app.getAppMetrics). When the page passes 2 GB, a mem-high problem, then only at each doubling (4, 8, 16 GB). For scale: the page is 74 MB at start with eight Claude tabs (measured after the restart).
  • startDiagnostics takes an optional appMetrics; Prism Terminal passes app.getAppMetrics. Prism gets the same by passing it (no other change).
  • npm run diag lists mem-high as a problem; docs/diagnostics.md lists the kind and the crumb.

Tests: 4 new unit tests (the crumb's fields, the 5-minute cadence, mem-high at 2 GB and each doubling only, the working-set fallback and a failing metrics call). Unit 2153 pass. No e2e change (the watch only writes log lines).

Core 0.40.9 -> 0.40.10, app 0.53.2 -> 0.53.3 (after #231).

🤖 Generated with Claude Code

https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA

Maxaubert and others added 2 commits October 16, 2026 03:01
…2 GB (core 0.40.10)

Owner, 2026-10-16, after every Claude tab in the Stable copy stopped taking
keys: the page process had grown to 15.9 GB overnight and nothing in the log
said so; it took a live look at the process list. Now the log says it:

- core/main/memWatch.ts: a `memory` crumb every 5 min (mainMb, pageMb,
  gpuMb, otherMb: private memory from app.getAppMetrics), and a `mem-high`
  problem when the page passes 2 GB, then only at each doubling.
- startDiagnostics takes the host's `appMetrics`; Prism Terminal passes
  app.getAppMetrics. Prism gets it by passing the same.
- `npm run diag` shows mem-high as a problem; docs/diagnostics.md lists both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA
# Conflicts:
#	package-lock.json
#	package.json
@Maxaubert
Maxaubert merged commit e5e0e03 into main Oct 16, 2026
2 checks passed
@Maxaubert
Maxaubert deleted the feat/mem-watch branch October 16, 2026 01:09
github-actions Bot pushed a commit that referenced this pull request Oct 16, 2026
…2 GB (core 0.40.10) (#232)

Owner, 2026-10-16, after every Claude tab in the Stable copy stopped taking
keys: the page process had grown to 15.9 GB overnight and nothing in the log
said so; it took a live look at the process list. Now the log says it:

- core/main/memWatch.ts: a `memory` crumb every 5 min (mainMb, pageMb,
  gpuMb, otherMb: private memory from app.getAppMetrics), and a `mem-high`
  problem when the page passes 2 GB, then only at each doubling.
- startDiagnostics takes the host's `appMetrics`; Prism Terminal passes
  app.getAppMetrics. Prism gets it by passing the same.
- `npm run diag` shows mem-high as a problem; docs/diagnostics.md lists both.


Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant