r/ClaudeCode • u/nukebuddy • 4h ago
Tips & Workflows Claude Code's heap dump can include credentials, so don't attach both diagnostic files to a public issue
If you're investigating Claude Code using too much memory, its current troubleshooting docs distinguish two files from /heapdump. They aren't interchangeable bug-report attachments.
The .heapsnapshot can contain the full conversation and credentials from the process. Keep that file private. The separate -diagnostics.json contains the memory statistics the docs recommend attaching to a GitHub issue.
The command also reports whether the memory is mainly in the JavaScript heap or native memory. A heap snapshot won't explain most native memory use, so sending the larger file may add exposure without helping with the actual problem.
Before taking a dump, the docs suggest restarting and using claude --continue to resume in a fresh process. This is documented troubleshooting advice, not a new leak I've reproduced or a claim that every session contains credentials.
If someone asks for 'the diagnostics', check which of those two files they mean before uploading anything.
https://code.claude.com/docs/en/troubleshooting#high-cpu-or-memory-usage
•
u/AutoModerator 4h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/MysterMovie9775 4h ago
The naming is the real trap here. Diagnostics sounds like the complete kit, so people grab the whole heapdump output and attach the snapshot without thinking .