promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Claude Code

/heapdump

Writes a JavaScript heap snapshot and a memory breakdown to diagnose high memory usage.

Writes a JavaScript heap snapshot and a memory breakdown to diagnose high memory usage. Target: ~/Desktop; on Linux without a Desktop folder, the home directory.

โœ… WHEN TO USE IT?

Claude Code is using unusually high memory

The terminal gets noticeably slow and Task Manager shows high RAM usage โ†’ run /heapdump; the snapshot lands on ~/Desktop (or the home directory on Linux without a Desktop folder) for analysis.

Document memory usage for a bug report

Before reporting a suspected memory leak, run /heapdump and attach the generated snapshot file to the bug report.

โ›” WHEN NOT TO?

The conversation's context window is full

heapdump measures the process's JavaScript memory usage, not the conversation's token usage.

Better: Use /context to visualize context usage as a grid.

General installation or setup problems

heapdump only produces a memory snapshot, not a diagnosis of installation or configuration issues.

Better: Use /doctor for a setup check.

SOURCES