Claude Code consumes 100%+ CPU when idle in terminal
Open 💬 11 comments Opened Jan 9, 2026 by elsigh
Description
Claude Code (the CLI) consumes 100%+ CPU even when idle in a terminal session. This drains battery significantly on laptops.
Environment
- macOS 26.2 (Darwin 25.2.0)
- Claude Code installed via npm
- Running in terminal (both standalone and within tmux)
Reproduction
- Start
claudein a terminal - Leave it idle (not actively processing a request)
- Observe CPU usage via
ps aux | grep claudeor Activity Monitor
Observed Behavior
$ ps aux | grep claude
user 52191 103.9 1.1 467673200 566032 s007 R+ 8:04AM 34:21.11 claude
user 48497 42.2 0.8 478110720 425616 s004 S+ Mon11AM 69:31.67 claude
Two Claude processes:
- One using 103.9% CPU (started today, running 34 min)
- One using 42.2% CPU (started Monday, running for days)
Stack Sample Analysis
Running sample <pid> shows the process is stuck in a tight loop:
737 uv__run_check (in node) + 136 [0x104f9fc14]
721 node::Environment::CheckImmediate(uv_check_s*) (in node) + 400
720 node::InternalMakeCallback(...)
719 v8::Function::Call(...)
[deep V8/JS execution]
This pattern suggests setImmediate() calls are being rapidly re-scheduled without proper yielding, causing a busy-wait loop instead of sleeping when idle.
Expected Behavior
When Claude Code is idle (waiting for user input), CPU usage should be near 0%.
Workaround
Kill the process: kill <pid>
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗