[Bug] Multiple Claude Code instances spawning, causing terminal flicker and CPU exhaustion since v2.0.14
Bug Description
THIS IS NOT THE COMMON FLICKERING ISSSUE
when i use claude code normally sometimes when i send a message the terminal keeps flickering, and claude code becomes unusable, i never get a reply, no matter how long i wait. the only chance to make it work again is to restart the app, when i check my activity monitor i have someimes up to 7 instances of claude code running eating up my cpu power and makes my entire system unusable.
not sure what to do, noticibly started after version 2.0.14
Environment Info
- Platform: darwin
- Terminal: zed
- Version: 2.0.19
- Feedback ID: 9032a789-a721-4dcc-a31a-9cb3db0556e8
Errors
[]
Additional information about the issue after debugging in verbose mode and checking logs:
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code enters an infinite loop creating empty file-history-snapshot entries, causing:
- Complete UI freeze with flickering/flashing
- High CPU and memory consumption
- No response to user messages
- Requires force-kill to recover (Ctrl+C doesn't work)
- Only solution is to kill process and restart
This has occurred 20+ times over the past few days, making Claude Code essentially unusable.
Evidence
Session log shows infinite snapshot loop (50+ snapshots in 30 seconds):
{"type":"file-history-snapshot","messageId":"...","snapshot":{"messageId":"...","trackedFileBackups":{},"timestamp":"2025-10-16T12:41:35.905Z"},"isSnapshotUpdate":false}
{"type":"file-history-snapshot","messageId":"...","snapshot":{"messageId":"...","trackedFileBackups":{},"timestamp":"2025-10-16T12:41:36.068Z"},"isSnapshotUpdate":false}
{"type":"file-history-snapshot","messageId":"...","snapshot":{"messageId":"...","trackedFileBackups":{},"timestamp":"2025-10-16T12:41:36.256Z"},"isSnapshotUpdate":false}
... [continues indefinitely, ~150-200ms intervals]
Key observations:
- Snapshots created every 150-200 milliseconds
- All snapshots are empty:
"trackedFileBackups":{} - No actual message processing occurs
- No API calls logged
- No errors logged - just infinite snapshot creation
Steps to Reproduce
- Start Claude Code in a project directory
- Send any message/prompt
- Observe: Screen begins flickering, no response received
- Check Activity Monitor: High CPU usage from node process
- Check logs:
tail -50 ~/.claude/projects/[PROJECT]/[SESSION].jsonlshows infinite file-history-snapshot entries
What Should Happen?
- Claude should process the message and respond
- UI should remain responsive
Actual Behavior
- Infinite loop of empty snapshot creation
- Complete hang requiring force-kill
- Makes Claude Code completely unusable
- Happens consistently across multiple sessions
- Happens in many different terminals including Ghostty, Zed, Cursor, Windsurf terminals
Impact
This bug makes Claude Code completely unusable. After 20+ occurrences in a few days, I cannot reliably use Claude Code for any work.
Corrupted Session Files
Found 20+ corrupted session files with excessive snapshot counts:
$ find ~/.claude/projects/ -name "*.jsonl" -exec sh -c 'grep -c "\"type\":\"file-history-snapshot\"" "$1"' sh {} \; | sort -n | tail -5
this bug was first noticed after version 2.0.14
bug has been present in 2.0.14+ through current 2.0.19
I can provide full session JSONL files, additional system logs, or any other debugging information needed.
7 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Found 27 corrupted session files with huge snapshot counts:
Total corrupted snapshots: ~350,000+ across all files
have a similar experience. this is in the newest debug log:
DEBUG] Writing to temp file: /home/mk/.claude.json.tmp.4438.1761242874804[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 170502 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mk/.claude.json.tmp.4438.1761242874804 to /home/mk/.claude.json
[DEBUG] File /home/mk/.claude.json written atomically
[ERROR] AxiosError: AxiosError: Request failed with status code 403
at HR (file:///home/mk/.nvm/versions/node/v24.8.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1136)
at Unzip.<anonymous> (file:///home/mk/.nvm/versions/node/v24.8.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9841)
at Unzip.emit (node:events:520:35)
at Unzip.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1701:12)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
at M71.request (file:///home/mk/.nvm/versions/node/v24.8.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2129)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async JHB (file:///home/mk/.nvm/versions/node/v24.8.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1540:25937)
[DEBUG] Failed to fetch Grove notice config: AxiosError: Request failed with status code 403
[ERROR] Failed to save config with lock: Error: Lock file is already being held
[DEBUG] Writing to temp file: /home/mk/.claude.json.tmp.4438.1761242875692
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 170502 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mk/.claude.json.tmp.4438.1761242875692 to /home/mk/.claude.json
[DEBUG] File /home/mk/.claude.json written atomically
[DEBUG] Getting matching hook commands for SessionStart with query: startup
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Anthropic talks about AI safety every day. But they can't fix a terminal bug that literally causes seizures. 💀💀💀
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.