anthropics / anthropics/claude-code
[Bug] Missing wake notification handler causes stale socket connections after system sleep
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**Bug Description**
NSWorkspaceDidActivateApplicationNotification ← app activation only
NSWorkspaceDidWakeNotification ← ABSENT
There is no wake handler. Claude Code never learns the machine slept, so it never resets its connection pool on resume — it just keeps handing out sockets that died during suspend. That's the actual defect, it's client-side, and no user-facing setting fixes it. The honest native fix is upstream: report it with /bug. Your sysctl is a kernel-side workaround for a missing app-side wake handler — effective, but compensating for someone else's gap.
**Environment Info**
- Platform: darwin
- Terminal: zed
- Version: 2.1.245
- Feedback ID: b991a1b0-0fba-485d-82cf-2ef8a0e03027
**Errors**
```json
[]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
The report identifies a missing NSWorkspaceDidWakeNotification handler and says the defect is client-side, but it names no repository file, test, or implementation entry point. First confirm whether wake handling exists in the client; done would require a reproducible post-sleep connection reset and repository direction, since the report currently recommends /bug rather than an in-repo fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100