You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI hangs at 99% CPU on startup with large session .jsonl files #22041
Confirming this issue on a different Linux distribution with some additional observations.
Environment
Claude Code version: 2.1.27
OS: Arch Linux (kernel 6.18.7-zen1-1-zen)
Hardware: Observed 4 claude processes simultaneously
Observations
Multiple concurrent processes: When hanging, observed 4 separate claude processes, each pegged at 100% CPU and consuming ~71GB virtual memory.
Race condition on config file: During the hang, rapid backup file creation occurred with timestamps 7ms apart:
-rw------- 1 user user 3940 Jan 30 21:43 .claude.json.backup.1769834596303
-rw------- 1 user user 3977 Jan 30 21:43 .claude.json.backup.1769834596310
-rw------- 1 user user 4022 Jan 30 21:43 .claude.json.backup.1769834606894
Diffing these backups showed feature flags being incrementally added between writes, suggesting concurrent config modification.
Trigger: Launching from home directory (~) where accumulated session files totaled ~40MB, including a 13MB .jsonl file.
This appears to be a regression introduced in 2.1.27 — same workflow was stable on previous versions. The home directory is frequently used as a launch point for ad-hoc tasks, accumulating sessions over time.
clearing ~/.claude/projects/* helped, but just for one session; every session after freezes again. reverted to 2.1.25 and so far it seems back to normal.
Claude Code completely hangs on ANY command (even --help or non-interactive -p)
CPU usage: 120% (maxing out cores)
RAM usage: 5-6GB and climbing
Process state: Running but unresponsive, Ctrl+C has no effect
Required kill -9 to terminate
Session Files Causing the Issue:
I had 37 session files total, with these large ones triggering the hang:
39MB session file
32MB session file
12MB session file
9.5MB session file
Workaround:
Moving ALL .jsonl files from ~/.claude/projects/ to a backup directory immediately resolved the issue. Claude
Code now starts instantly. Restoring only small session files (<1MB) works fine.
Impact:
This makes Claude Code completely unusable when working on long-running projects that accumulate large session
histories. The hang happens during initialization before any user interaction, making it impossible to even access the
CLI.
Would be great to see either:
Graceful handling of large session files (pagination, lazy loading)
Clear error message when files exceed a certain size
I'm experiencing the same issue on macOS 26.2 (25C56).
So, I downgraded to version 2.1.20 and am using it for now.
I've been using it for about an hour and thankfully, it's still working fine.
I hope they fix it soon.
Same issue on crostini. removing the entire ~/.claude helped for the first session but then after one chat it's back again.
removing rm ~/.claude/projects/[PATH]/*.jsonl also works well for one time
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Jan 30, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
pback34 commentedon Jan 30, 2026
i may have accidentally filed duplicate issue:
#22057
Also on ubuntu 24.04 (Pop!_OS) cosmic
davidmoneil commentedon Jan 31, 2026
I'm experiencing the same issue on v2.1.27 (Linux). Additional findings:
Workaround: rm -rf ~/.claude/projects/-home-username-ProjectName/* before starting
1337hero commentedon Jan 31, 2026
Additional Reproduction Data (Arch Linux)
Confirming this issue on a different Linux distribution with some additional observations.
Environment
Observations
Multiple concurrent processes: When hanging, observed 4 separate
claudeprocesses, each pegged at 100% CPU and consuming ~71GB virtual memory.Race condition on config file: During the hang, rapid backup file creation occurred with timestamps 7ms apart:
Diffing these backups showed feature flags being incrementally added between writes, suggesting concurrent config modification.
Trigger: Launching from home directory (
~) where accumulated session files totaled ~40MB, including a 13MB.jsonlfile.Session file breakdown:
Workaround Confirmed
Immediately resolved the issue.
Additional Context
This appears to be a regression introduced in 2.1.27 — same workflow was stable on previous versions. The home directory is frequently used as a launch point for ad-hoc tasks, accumulating sessions over time.
GLeonov commentedon Jan 31, 2026
Same issue on MacOS 26.2 (25C56) & Claude Code version 2.1.27
hschmied commentedon Jan 31, 2026
clearing ~/.claude/projects/* helped, but just for one session; every session after freezes again. reverted to 2.1.25 and so far it seems back to normal.
bharrison6 commentedon Jan 31, 2026
Confirming this issue on Ubuntu VPS
Environment: - Claude Code version:
2.1.27~/.claude/projects/Symptoms:
--helpor non-interactive-p)kill -9to terminateSession Files Causing the Issue:
I had 37 session files total, with these large ones triggering the hang:
Workaround:
Moving ALL
.jsonlfiles from~/.claude/projects/to a backup directory immediately resolved the issue. ClaudeCode now starts instantly. Restoring only small session files (<1MB) works fine.
Impact:
This makes Claude Code completely unusable when working on long-running projects that accumulate large session
histories. The hang happens during initialization before any user interaction, making it impossible to even access the
CLI.
Would be great to see either:
Happy to provide more debug info if needed!
imkdw commentedon Jan 31, 2026
I'm experiencing the same issue on macOS 26.2 (25C56).
So, I downgraded to version 2.1.20 and am using it for now.
I've been using it for about an hour and thankfully, it's still working fine.
I hope they fix it soon.
bilbo-22 commentedon Jan 31, 2026
Same issue on crostini. removing the entire ~/.claude helped for the first session but then after one chat it's back again.
removing
rm ~/.claude/projects/[PATH]/*.jsonlalso works well for one timethieung commentedon Jan 31, 2026
Me too, downgrade to 2.1.25 works fine now.
Downgrade:
Disable auto update:
Edit ~/.claude/settings.json
mlarocque commentedon Jan 31, 2026
In my case doing a
/resumein 2.1.27 definitely causes the freeze.github-actions commentedon Feb 8, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.