[Bug] Busy-loop polling non-existent config files causes 99%+ CPU consumption
Resolved 💬 5 comments Opened Jan 23, 2026 by uri-gil Closed Feb 28, 2026
Bug Description
Related but distinct from #11170:
- Higher CPU (99-122% vs 10-40%)
- Different trigger: backgrounding agents, not API calls
- Additional paths polled:
~/.claude/plans,private/tmp - Workaround found: Escape key 3x breaks the loop
- Still responses very slowly (during /bug)
- Newer version (2.1.17 vs 2.0.35)
---
Summary: Claude Code 2.1.17 enters busy-loop polling for non-existent config files, consuming 99-122% CPU indefinitely
Environment:
- Claude Code version: 2.1.17
- OS: macOS 26.2 (25C56)
- Hardware: M4 Max, 128GB RAM
Symptoms:
- Process stuck at 99-122% CPU for 42+ minutes
fs_usageshowed tight loop polling these non-existent files thousands of times per second:~/.claude/.config.json(ENOENT)~/.claude/plans(ENOENT)private/tmp(relative path, ENOENT)- Memory bloated to 3.1 GB RSS (normal ~300-500 MB)
- CLI became unresponsive
What I tried:
- Creating
~/.claude/.config.jsonwith{}- did NOT fix - Creating
~/.claude/plansdirectory - did NOT fix
Workaround found:
- Pressing Escape key 3+ times broke the loop
- CPU dropped from 122% to 0.4% after Escape
Diagnostic data collected:
- CPU sample (10 sec)
- lsof output
- fs_usage trace showing the polling loop
- Available on request
Reproduction:
Scenario (not verified as reproduction steps):
3 agent tasks were sent to background prior to observing the issue
High CPU noticed in top afterward
Unknown if this was the trigger or coincident
---
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.17
- Feedback ID: cca42af1-dd2a-4887-bcdb-c77129a083e2
Errors
[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:1903)\n at vW (/$bunfs/root/claude:11:35097)\n at readdirSync (/$bunfs/root/claude:12:1864)\n at y2R (/$bunfs/root/claude:1479:380)\n at y2R (/$bunfs/root/claude:1479:1350)\n at <anonymous> (/$bunfs/root/claude:1479:4440)\n at <anonymous> (/$bunfs/root/claude:1479:5171)\n at A (/$bunfs/root/claude:11:7244)\n at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T18:59:49.598Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:47:9586)\n at emit (node:events:95:22)\n at addChunk (internal:streams/readable:264:47)\n at readableAddChunkPushByteMode (internal:streams/readable:242:18)\n at processCallback (node:zlib:246:61)\n at request (/$bunfs/root/claude:49:2148)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-23T19:17:27.045Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:1903)\n at vW (/$bunfs/root/claude:11:35097)\n at readdirSync (/$bunfs/root/claude:12:1864)\n at y2R (/$bunfs/root/claude:1479:380)\n at y2R (/$bunfs/root/claude:1479:1350)\n at <anonymous> (/$bunfs/root/claude:1479:4440)\n at <anonymous> (/$bunfs/root/claude:1479:5171)\n at A (/$bunfs/root/claude:11:7244)\n at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T19:19:39.969Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:1903)\n at vW (/$bunfs/root/claude:11:35097)\n at readdirSync (/$bunfs/root/claude:12:1864)\n at y2R (/$bunfs/root/claude:1479:380)\n at y2R (/$bunfs/root/claude:1479:1350)\n at <anonymous> (/$bunfs/root/claude:1479:4440)\n at <anonymous> (/$bunfs/root/claude:1479:5171)\n at A (/$bunfs/root/claude:11:7244)\n at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T19:20:20.159Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:1903)\n at vW (/$bunfs/root/claude:11:35097)\n at readdirSync (/$bunfs/root/claude:12:1864)\n at y2R (/$bunfs/root/claude:1479:380)\n at y2R (/$bunfs/root/claude:1479:1350)\n at <anonymous> (/$bunfs/root/claude:1479:4440)\n at <anonymous> (/$bunfs/root/claude:1479:5171)\n at A (/$bunfs/root/claude:11:7244)\n at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T19:20:33.150Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:1903)\n at vW (/$bunfs/root/claude:11:3…
Note: Content was truncated.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗