[Bug] Multiple Claude Code instances spawning, causing terminal flicker and CPU exhaustion since v2.0.14

Status Closed — not planned
Maintainer reply None cached
Activity 7 comments · opened Oct 16, 2025 · closed Jan 18, 2026

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

  1. Start Claude Code in a project directory
  2. Send any message/prompt
  3. Observe: Screen begins flickering, no response received
  4. Check Activity Monitor: High CPU usage from node process
  5. Check logs: tail -50 ~/.claude/projects/[PROJECT]/[SESSION].jsonl shows 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.

View original on GitHub ↗

7 Comments

github-actions[bot] · 12 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7955
  2. https://github.com/anthropics/claude-code/issues/9477
  3. https://github.com/anthropics/claude-code/issues/9494

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Wirasm · 12 months ago

Found 27 corrupted session files with huge snapshot counts:

64,782 snapshots: 048ce7ef-fb75-4c7d-a1d1-0a5603d4763e.jsonl
64,777 snapshots: 1c3d8c05-4a93-41d3-893d-14db22b95bab.jsonl
29,631 snapshots: bb17dda9-3a96-42d3-a403-3000382aab20.jsonl
17,705 snapshots: c45bd297-54fa-4305-b1d3-c6220ce418b7.jsonl
14,992 snapshots: 11da4e4c-8cfa-45b4-ad04-c3723643cc48.jsonl
12,753 snapshots: ce560278-1108-449d-aa60-07e96251cb9a.jsonl
10,920 snapshots: 918d4d09-c3ce-4bb9-8d79-9f58da287421.jsonl
9,115 snapshots: 06496738-05d6-4555-8e52-7838ff4ee9d3.jsonl
7,500 snapshots: 9a895dc1-8e47-4d60-8adb-5dcf29a15ece.jsonl
7,290 snapshots: b88a0c9a-71d3-429e-a21c-2502acdd9f87.jsonl
... (17 more files with 50-5,000 snapshots)

Total corrupted snapshots: ~350,000+ across all files

ManuelKugelmann · 11 months ago

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

github-actions[bot] · 10 months ago

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.

github-actions[bot] · 8 months ago

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.

github-actions[bot] · 8 months ago

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.