[Bug] macOS sleep inhibitor continuously respawns caffeinate preventing system sleep
Status Closed — not planned
Reported on v2.1.156
Maintainer reply None cached
Activity 1 comment · opened Jun 1, 2026 · closed Jul 5, 2026
Bug Description
On macOS, Claude Code spawns and continually respawns caffeinate -i -t 300 to keep the Mac awake during active sessions. Confirmed via pmset -g assertions (PreventUserIdleSystemSleep named: "caffeinate command-line tool") and process tree (caffeinate » claude » zsh → Terminal). The binary contains a "sleep inhibitor" that logs "Restarting sleep inhibitor to maintain prevention," so external tools like Raycast decaffeinate can't stop it.
Is there a way to opt out? Because my mac won't sleep, even if cc has no active processes .
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.156
- Feedback ID: 1be5a5a2-7cb8-4843-8c6d-02522990034c
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗