Dashboardopencode-loreOpenCode heap-snapshot isolation

OpenCode heap-snapshot isolation

Category: preference
Confidence: 1.00
ID: 01a0a4f1-783c-7565-93b9-49d7ee0a435d
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0PmP9YZ9Ud34cfjtE
Created: 2026-09-15 10:14:44
Updated: 2026-09-15 12:01:23

Content

Steps:

  1. Freeze OpenCode PID, start identity, cgroup, snapshot metadata, and hashes—restarts invalidate attribution.
  2. Keep the service and artifacts read-only: never signal, restart, force GC, use the network, access production data, or load snapshots wholesale in JavaScript/Python.
  3. Run bounded streaming C/C++ analysis outside opencode.service with MemoryHigh≤640M, MemoryMax≤768M, and swap disabled.
  4. Monitor RssAnon + VmSwap, [heap], isolate committed prefixes, 256 KiB mapping count, and cgroup anon/file/swap—RSS alone hides paging.
  5. Stop all live captures once reclaim, swap, PSI, or memory.events high begins; preserve active work and use a planned restart for immediate allocator-high-water reclamation. Gotchas:
Move to: