You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 14, 2026. It is now read-only.
When starting a new session remotely (from the Happy Coder mobile app) while the Mac has no foreground activity (lid closed / screen locked), the spawned happy claude child processes get throttled by macOS and fail to send the session webhook within the 15-second timeout.
Reproduction Steps
Start the daemon on macOS (happy daemon start-sync)
Close the laptop lid or lock the screen (keep the machine awake via caffeinate/daemon)
From the Happy Coder mobile app, try to start a new session on that machine
The spawn request times out with [RPC] [ERROR] Error handling request {"error":{}}
Retry multiple times — each retry spawns another zombie process
Observed Behavior
From the daemon log:
[11:51:01] [SPAWN HAPPY CLI] Spawning: happy claude --happy-starting-mode remote --started-by daemon
[11:51:01] [DAEMON RUN] Spawned process with PID 90269
[11:51:01] [DAEMON RUN] Waiting for session webhook for PID 90269
[11:51:16] [DAEMON RUN] Session webhook timeout for PID 90269
[11:51:16] [RPC] [ERROR] Error handling request {"error":{}}
This happened 5 times between 11:51-11:55. All 5 processes woke up simultaneously at 12:28:21 (37 minutes later), confirming macOS was throttling them:
# All 5 child process logs start at the exact same second:
[12:28:21.575] Starting happy CLI with args: ... claude --happy-starting-mode remote --started-by daemon
[12:28:21.577] Starting happy CLI with args: ... claude --happy-starting-mode remote --started-by daemon
[12:28:21.575] Starting happy CLI with args: ... claude --happy-starting-mode remote --started-by daemon
...
Later spawns at 12:59 (when the machine was actively used) succeeded within 3 seconds.
Problem
When starting a new session remotely (from the Happy Coder mobile app) while the Mac has no foreground activity (lid closed / screen locked), the spawned
happy claudechild processes get throttled by macOS and fail to send the session webhook within the 15-second timeout.Reproduction Steps
happy daemon start-sync)[RPC] [ERROR] Error handling request {"error":{}}Observed Behavior
From the daemon log:
This happened 5 times between 11:51-11:55. All 5 processes woke up simultaneously at 12:28:21 (37 minutes later), confirming macOS was throttling them:
Later spawns at 12:59 (when the machine was actively used) succeeded within 3 seconds.
Root Cause
macOS aggressively throttles background processes that:
??inpsoutput)The daemon itself stays alive (it has
caffeinateand was spawned from a terminal), but its child processes inherit a lower scheduling priority.Impact
happy claudeprocesses accumulate (each retry spawns a new one)killzombie PIDs) is requiredSuggested Fixes
Wrap child process spawn with
caffeinate -ito prevent macOS from throttling the child:Increase the webhook timeout (e.g., 60s or 120s) for remote-spawned sessions, since macOS scheduling delays can far exceed 15s
Deduplicate spawn requests — if a spawn for the same directory is already pending/in-progress, don't spawn another process
Kill timed-out child processes — if the webhook times out, send SIGTERM to the spawned PID to prevent zombie accumulation
Environment