Parent
Part of #3000.
Goal
Add the first, low-risk memory diagnostic entry point: /doctor memory should emit a compact baseline report that users can paste into OOM / long-session memory reports before attempting heavier heap snapshots.
Scope
- Add
/doctor memory command wiring.
- Report Node/V8 process memory fields:
rss
heapTotal
heapUsed
external
arrayBuffers
- Report V8 heap statistics / heap-space summary when available.
- Report active handle/request counts when available.
- Report platform metadata useful for triage: Node version, platform, arch, pid, uptime.
- Keep output human-readable and safe to paste in GitHub issues.
Non-goals for this first step
- No heap snapshot generation yet.
- No filesystem export yet.
- No memory timeline/ring buffer yet.
- No UI history/tool-result offload changes yet.
Follow-up slices
/doctor memory --export to write diagnostics.json.
/doctor memory --heap / hidden /heapdump, writing diagnostics first and heap snapshot second.
- Memory pressure sampling/timeline.
- UI history and large tool-result retention limits.
Acceptance criteria
/doctor memory works in the interactive CLI.
- Unit tests cover the command processor path and assert key sections/fields are present.
- The command does not require optional native dependencies and degrades gracefully if V8/handle internals are unavailable.
Parent
Part of #3000.
Goal
Add the first, low-risk memory diagnostic entry point:
/doctor memoryshould emit a compact baseline report that users can paste into OOM / long-session memory reports before attempting heavier heap snapshots.Scope
/doctor memorycommand wiring.rssheapTotalheapUsedexternalarrayBuffersNon-goals for this first step
Follow-up slices
/doctor memory --exportto writediagnostics.json./doctor memory --heap/ hidden/heapdump, writing diagnostics first and heap snapshot second.Acceptance criteria
/doctor memoryworks in the interactive CLI.