Troubleshooting
This guide helps you diagnose and resolve common issues with Happy CLI. Thehappy doctor command is your first stop for automated diagnostics.
Doctor Command
The doctor command provides comprehensive system diagnostics:- Happy CLI version and platform info
- Configuration and environment variables
- Authentication status
- Daemon status and process list
- Recent log files
- Support links
Doctor Output
Example output:Daemon-Only Diagnostics
Focus on daemon-related issues:Common Issues
Authentication Problems
Error: Not authenticated
Error: Not authenticated
Symptoms: Solution:If already authenticated but still seeing errors:
Error: Not authenticated when running happyDiagnosis:Authentication hangs at 'Waiting for authentication'
Authentication hangs at 'Waiting for authentication'
Symptoms: CLI stuck polling for authenticationCauses:
- Mobile app not responding to QR code
- Network connectivity issues
- Server timeout
- Press
Ctrl+Cto cancel - Check network connection:
- Try web authentication instead of mobile
- Check firewall/proxy settings
QR code not displaying correctly
QR code not displaying correctly
Symptoms: Garbled QR code in terminalCauses:
- Terminal doesn’t support unicode
- Font size too small
- Color scheme interference
- Increase terminal font size
- Use manual URL shown below QR code
- Switch to web authentication
- Try a different terminal emulator
Daemon Issues
Daemon won't start
Daemon won't start
Symptoms: Solution:
Daemon already running but daemon status shows not runningDiagnosis:Daemon version mismatch
Daemon version mismatch
Symptoms:
Daemon version mismatch detected in logsCause: Happy CLI was upgraded but daemon still running old versionSolution: Daemon should auto-restart. If not:Multiple daemon processes running
Multiple daemon processes running
Symptoms: Solution:
happy daemon list shows duplicate entries or errorsDiagnosis:Session Problems
Session won't start
Session won't start
Symptoms: Happy starts but Claude doesn’t launchDiagnosis:Common causes:
- Claude Code not installed:
- Authentication expired:
- Sandbox blocking execution:
Session stuck in 'thinking' state
Session stuck in 'thinking' state
Symptoms: Session appears frozen, no responsesDiagnosis:Solution:
Can't resume session
Can't resume session
Symptoms: Note: Resume creates a NEW session ID with copied history. This is expected Claude Code behavior.Workaround: Use the session ID shown in previous session output.
--resume flag doesn’t restore previous conversationCheck:Network and Connectivity
Can't connect to Happy servers
Can't connect to Happy servers
Symptoms: Connection errors, timeoutsDiagnosis:Solutions:
- Check firewall settings
- Verify proxy configuration
- Test with custom server:
WebSocket connection fails
WebSocket connection fails
Symptoms: Sessions start but don’t sync to mobileDiagnosis: Check daemon logs:Solutions:
- Restart daemon:
- Check firewall allows WebSocket connections
- Verify authentication:
File System and Sandbox
Permission denied errors
Permission denied errors
Symptoms: Claude can’t read/write filesDiagnosis:Solutions:
- Temporarily disable sandbox:
- Reconfigure sandbox:
- Check file permissions:
Can't access workspace directory
Can't access workspace directory
Symptoms: Sandbox blocks access to project filesCheck configuration:Solution: Update workspace root:
Process Management
Viewing Processes
See all Happy-related processes:- Current Process: The
doctorcommand itself - Daemon: Background service
- Daemon-Spawned Sessions: Remote-controlled sessions
- User Sessions: Terminal-launched sessions
- Doctor: Diagnostic commands
Cleaning Up Processes
Kill all runaway Happy processes:- Stale daemon processes
- Hung version check processes
- Orphaned session processes
- Zombie processes
Manual Process Management
Find Happy processes manually:Log Analysis
Finding Logs
Log location:Viewing Logs
Tail latest session log:Log Format
Logs include:- Timestamp
- Log level (DEBUG, INFO, ERROR)
- Component (DAEMON, AUTH, SESSION, etc.)
- Message
- Stack traces (for errors)
Debug Mode
Enable detailed logging:- Detailed execution flow
- API request/response data
- WebSocket messages
- Internal state changes
Environment Diagnostics
Check Environment
View all environment variables:Verify Installation
Check Happy CLI is properly installed:Check Dependencies
Verify required tools:Advanced Troubleshooting
State File Corruption
If daemon state is corrupted:Lock File Issues
If lock file is stuck:Reset to Factory Defaults
Completely reset Happy:Getting Help
Report Issues
When reporting bugs, include:-
System info:
-
Relevant logs:
- Steps to reproduce
- Expected vs actual behavior
Support Channels
- GitHub Issues: https://github.com/slopus/happy-cli/issues
- Documentation: https://happy.engineering/
- Community: Join our Discord/Slack (link in docs)
Debug Checklist
Before asking for help, verify:- Ran
happy doctorand reviewed output - Checked authentication:
happy auth status - Verified daemon:
happy daemon status - Reviewed recent logs
- Tried
happy doctor clean - Tested with
--no-sandbox - Checked network connectivity
- Verified Node.js version (>= 18)
- Claude Code is installed and working
Related Commands
happy auth status- Check authenticationhappy daemon status- Check daemonhappy sandbox status- Check sandbox