[BUG] Out of memory crash from .claude logs
Resolved 💬 4 comments Opened Jan 20, 2026 by noelpuig Closed Jan 20, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude code was crashing on startup when accessing it from one user- this did not happen from other users.
<img width="2110" height="959" alt="Image" src="https://github.com/user-attachments/assets/9f2539d4-ca7c-4912-aa1b-cdc38e7a00b7" />
Apparently, a really big .claude file can cause crashes if it runs out of RAM.
> Found the issue. The user has 4.6GB of Claude session history accumulated in ~/.claude/projects/. When Claude starts, it tries to load this data and runs out of memory (the heap limit is around 1.9GB).
> Correct, Claude Code doesn't aggressively clean up old data. Here's what was stored:
What the data was:
- projects/ (4.2GB) - Conversation transcripts for every session in each directory you used Claude in. Each .jsonl file is a full conversation history including all messages, tool calls, file contents read, and AI responses
- debug/ (325MB) - Debug logs and diagnostic information
Why it grew so large:
- Every time Claude reads a file, that content gets stored in the session transcript
- Long sessions with lots of file reads/edits accumulate quickly
Does Claude clean this up?
Not really. It keeps session history so you can resume conversations with /resume, but there's no automatic pruning of old sessions. This is arguably a bug or missing feature - accumulating 4.6GB without cleanup isn't ideal.
What Should Happen?
Clean up old sessions or error handling.
Error Messages/Logs
Steps to Reproduce
Have a huge .claude file
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.12
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗