fix: remove stale Happy daemon lock file on startup #17
Reference in New Issue
Block a user
Delete Branch "fix/happy-daemon-stale-lock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
daemon.state.json.lockis left behind inHAPPY_HOME_DIRwhen the daemon crashes or the pod is killed/restarted. On next startuphappy daemon startsees the lock file and silently exits withFailed to start daemon, leaving no daemon running.Since the lock lives on the PVC (
/home/user/.happy/) it persists across pod restarts, causing every subsequent boot to fail.The fix is to remove the lock unconditionally before starting — if no daemon is running, the lock is stale by definition.
Test plan
rm ~/.happy/daemon.state.json.lock && happy daemon startworks in current podhappy daemon statusshows running🤖 Generated with Claude Code