Skip to content

[Bug] macOS sleep inhibitor continuously respawns caffeinate preventing system sleep #64522

Description

@aaronphua-git

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

[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreduplicateThis issue or pull request already existsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions