Repository navigation
feat(diag): each process's memory every 5 minutes, and mem-high past 2 GB (core 0.40.10) - #232
Merged
Merged
Conversation
…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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 amemorycrumb with each kind of process's private memory (mainMb,pageMb,gpuMb,otherMb, fromapp.getAppMetrics). When the page passes 2 GB, amem-highproblem, 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).startDiagnosticstakes an optionalappMetrics; Prism Terminal passesapp.getAppMetrics. Prism gets the same by passing it (no other change).npm run diaglistsmem-highas a problem;docs/diagnostics.mdlists 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