Compare commits

...

3 Commits

Author SHA1 Message Date
Chris Farhood 5d8b1369c3 fix: move HAPPY_HOME_DIR to /workspace so lock never persists across restarts
The daemon.state.json.lock lives on the home PVC and survives pod
restarts, causing happy daemon start to fail on every reboot. Moving
HAPPY_HOME_DIR to /workspace (emptyDir) means the entire happy state
directory is ephemeral and always clean on startup.

The rm -f in init-repo.sh is kept as a safety net for the within-run
case but is now a no-op on fresh starts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 10:20:49 -05:00
Chris Farhood 751402be44 fix: remove stale happy daemon lock file before starting
daemon.state.json.lock is left behind when the daemon crashes or is
killed (e.g. pod restart). On next startup happy daemon start sees the
lock and exits with "Failed to start daemon" without further detail.

Remove the lock file unconditionally at startup — if no daemon is
running, the lock is stale by definition.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 10:18:12 -05:00
Chris Farhood 66e0d1f406 Merge pull request #16 from cpfarhood/fix/happy-daemon-no-sudo
fix: remove sudo from happy daemon start
2026-02-20 10:07:24 -05:00
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ githubRepo: ""
# Happy Coder endpoints
happyServerUrl: "https://happy.farh.net"
happyWebappUrl: "https://happy-coder.farh.net"
happyHomeDir: "/home/user/.happy"
happyHomeDir: "/workspace/.happy"
happyExperimental: "true"
# VNC display
+5
View File
@@ -63,6 +63,11 @@ chown "$RUN_UID:$RUN_GID" "$HOME"
# so no sudo needed — Happy/Claude Code will find credentials in the correct home dir.
echo "Starting Happy Coder..."
# HAPPY_HOME_DIR is in /workspace (emptyDir), so it is always fresh on pod start.
# Remove the lock file as a safety net in case daemon start is called more than
# once within the same container lifetime.
rm -f "${HAPPY_HOME_DIR:-/workspace/.happy}/daemon.state.json.lock"
cd "$WORKSPACE_DIR"
happy daemon start || echo "Happy Coder daemon failed to start, continuing anyway..."