TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/slopus/happy/llms.txt
Use this file to discover all available pages before exploring further.
happy daemon command manages the Happy background service that enables remote session spawning and mobile control.
Syntax
Subcommands
start
Start the daemon in detached mode.stop
Stop the daemon (sessions continue running).Stopping the daemon does not kill active sessions. They continue running but can’t spawn new sessions remotely until the daemon restarts.
status
Show daemon status and diagnostics.list
List active sessions tracked by the daemon.stop-session
Stop a specific session by ID.The session ID to stop
logs
Display the path to the latest daemon log file.install
Install the daemon as a system service (platform-specific).On macOS, this creates a LaunchAgent that starts the daemon at login.
uninstall
Uninstall the daemon system service.Description
The Happy daemon is a background service that:- Enables spawning sessions from your mobile device
- Manages session lifecycle
- Provides keep-alive signals for active sessions
- Handles version compatibility checks
- Maintains session registry
Auto-Start Behavior
The daemon automatically starts when you:- Run
happy(main command) - Run
happy gemini - Run
happy acp - Start any agent that requires mobile control
You typically don’t need to manually start the daemon - Happy handles it automatically.
Examples
Check Daemon Status
List Active Sessions
Stop a Session
View Daemon Logs
Start Daemon Manually
Stop Daemon
Install as System Service (macOS)
- At system login
- When the user logs in
- After crashes (with exponential backoff)
Uninstall System Service
Daemon State File
The daemon stores its state in:- Production:
~/.happy/daemon-state.json - Development:
~/.happy-dev/daemon-state.json
State File Contents
Process ID of the running daemon
Unix timestamp when daemon started
Version of Happy CLI that started the daemon
HTTP port the daemon listens on for control commands
Log Files
Daemon logs are stored in:- Location:
~/.happy/logs/(or~/.happy-dev/logs/) - Format:
YYYY-MM-DD-HH-MM-SS-daemon.log - Example:
2024-01-15-10-30-00-daemon.log
Viewing Logs
Version Compatibility
The daemon includes version checking:- Automatically restarts if CLI version doesn’t match daemon version
- Ensures compatibility between daemon and CLI commands
- Prevents version mismatch issues
Version Mismatch Handling
When you update Happy CLI:- Next
happycommand detects version mismatch - Automatically stops old daemon
- Starts new daemon with current version
- Session continues seamlessly
Process Management
Daemon Process Hierarchy
Cleanup Runaway Processes
If processes become orphaned or stuck:- Find all Happy-related processes
- Identify orphaned/stuck processes
- Kill runaway processes
- Clean up stale state files
Troubleshooting
Daemon Won’t Start
If daemon fails to start:Daemon Keeps Restarting
If daemon repeatedly restarts:Stale Daemon State
If state file exists but daemon isn’t running:Can’t Connect to Daemon
If commands fail to reach the daemon:Sessions Not Listed
Ifhappy daemon list shows no sessions but you have active sessions:
Sessions started before the current daemon may not appear in the list. The daemon only tracks sessions started after it was launched.
Environment Variables
Server URL for the daemon to connect to
Override Happy data directory
Advanced Usage
Synchronous Start (Internal)
happy daemon start to spawn the detached process.
Monitor Daemon
Related Commands
- happy - Start Claude Code sessions
- happy doctor - System diagnostics and cleanup
- happy auth - Authentication management
The daemon runs automatically when needed. You typically only need these commands for troubleshooting or manual control.