[BUG] / puts the machine to sleep
Resolved 💬 1 comment Opened May 1, 2026 by fanispoulinakisai-boop Closed Jun 1, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
- At 08:34:24 the Claude.app process (PID 97627) fired
AESendMessage(aevt,slep)to loginwindow ~15ms after an AppKitperform action for menu item/sendAction:event. - That means a menu item handler in Claude.app issued a system sleep AppleEvent.
What Should Happen?
it should not generate a system sleep event.
Error Messages/Logs
Steps to Reproduce
Here's a copy-paste version for that field:
1. Use the Claude desktop app on macOS (Darwin 25.2.0 / Tahoe).
App build observed: appVersion 1.5354.0 (deployment "1p").
2. With Claude.app as the frontmost application, perform normal use
(specific input still unidentified — see note below).
3. The Mac enters Software Sleep without the user invoking
Apple menu > Sleep, the power button, or any system-level
sleep shortcut.
What the system log shows at the moment of sleep
(timestamps from one occurrence, 2026-05-01 08:34:24 +0300):
08:34:24.402015 Claude (PID 97627): (AppKit) perform action for menu item
08:34:24.402043 Claude (PID 97627): (AppKit) sendAction:
08:34:24.417535 Claude (PID 97627): (AE) AESendMessage(aevt,slep
{aevt,slep target='psn '[loginwindow] returnID=26936})
08:34:24.429881 loginwindow (PID 419): received kAESleep apple event,
sleeping the system
08:34:24.430527 kernel: PMRD: sleep reason Software Sleep
Interpretation: an NSMenuItem inside Claude.app (either clicked or
triggered via a key equivalent) invokes a handler that sends the
kAESleep Apple Event (`tell application "loginwindow" to sleep`)
to loginwindow, which then puts the Mac to sleep.
Expected behavior: no menu item or shortcut in the Claude desktop
app should issue a system-wide sleep AppleEvent. If such an item
exists intentionally, it should be clearly labeled and protected
from accidental activation; otherwise it should be removed.
Note: the AppKit log redacts the menu item title as <private>,
so I cannot identify the exact item from outside the app.
Internal logs / source should reveal which menu item's action
selector calls AESendMessage with eventClass 'aevt' eventID 'slep'.
Reproduction is currently intermittent on my end because I do not
yet know which interaction triggers it. Happy to capture another
log sample if helpful.
Want me to also draft the Title and the Description / What Happened fields so the whole report is consistent?
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.123 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗