Claude.app leaks claude-code subprocesses; ~150+ accumulate over 12 hours
Resolved 💬 4 comments Opened Apr 30, 2026 by Y-F-B-25 Closed Apr 30, 2026
Environment
- Claude Desktop 2.1.121
- macOS Darwin 25.2.0 ARM64
Steps to reproduce
- Open 2 or 3 Claude Code sessions in Claude.app and leave them running for 8+ hours.
- From a terminal: \
ps -ef | grep claude | wc -l\
Expected
~6-12 claude processes (parent + child for each open session, plus a few MCP server helpers).
Actual
175+ claude processes. They accumulate at a rate of one new pair every ~5 minutes, parented by Claude.app itself (not by any session). Old processes are not killed when new ones spawn. Each consumes 2-4% CPU. Cumulative load can drive the system to 80%+ CPU.
Diagnostics
- \
ps -eo pid,ppid,etime,command\shows pairs of claude processes spaced at exactly 5-minute intervals across the full uptime of Claude.app. - All leaked children are parented by the Claude.app PID (\
application.com.anthropic.claudefordesktop\), not by any user-opened session. - The 3 active session PIDs (matched by \
--resume <session-id>\in argv) are clean. Everything else is orphan. - No user code or scheduled task in our project invokes the claude binary. Verified by grep.
Workaround
- Quit Claude.app fully (Cmd-Q) and relaunch. Process tree dies. Counter resets.
- This costs the user all in-flight session context.
Impact
- System CPU pegs at 80%+ over time. Laptop fans spin up. Battery drains.
- User must Cmd-Q + restart on a multi-hour cadence to keep the machine usable.
- Other agents in the same Claude.app instance experience slow tool execution due to CPU starvation.
Request
- Identify the spawn source inside Claude.app (likely a session keepalive or health check on a 5-minute cadence).
- Either kill the prior process before spawning the next, or stop spawning entirely if existing children are healthy.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗