Common Issues¶
Solutions for frequently encountered problems.
Installation Issues¶
Command not found after install¶
If agentwatch isn't recognized:
# Check if ~/.local/bin is in PATH
echo $PATH | grep -q "$HOME/.local/bin" && echo "OK" || echo "Missing"
# Add to shell config
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Permission denied during install¶
# Create directory with correct permissions
mkdir -p ~/.local/bin
chmod 755 ~/.local/bin
# Retry install
curl https://agentwatch.sh | bash
Python version too old¶
agentwatch requires Python 3.10+:
python3 --version
# If < 3.10, install newer Python
# macOS:
brew install python@3.11
# Linux:
sudo apt install python3.11
Daemon Issues¶
Daemon won't start¶
Check for existing processes:
# Check if already running
pgrep -f agentwatch
# Check logs
tail -50 ~/.cache/agentwatch/daemon.log
# Try foreground mode for debugging
agentwatch start -f
Port 8081 already in use¶
# Find what's using the port
lsof -i :8081
# Kill if needed
kill $(lsof -ti :8081)
# Or change port in config
web_viewer:
port: 8082
Service file issues¶
Service-manager restarts are cold
systemctl --user restart agentwatch and launchctl unload/load bypass
the CLI, so they drop the tunnel and log you out. Use agentwatch restart
when you want to stay logged in (see Logged out after every
restart).
Authentication Issues¶
Login fails in web viewer¶
-
Verify credentials work locally:
-
Check you're the daemon user:
-
Check PAM configuration (Linux):
Session expired too quickly¶
Sessions last 24 hours. If expiring sooner:
Logged out after every restart¶
Use agentwatch restart to restart the daemon. It preserves your web-viewer
login (and hands off the Cloudflare tunnel) across the restart. A stop + start,
a crash, a reboot, or a service-manager restart (systemctl --user restart
agentwatch, launchctl unload/load) is a cold restart and intentionally
logs you out — reserve those for when you want a clean slate / forced re-auth.
# Continuity-preserving (stay logged in):
agentwatch restart
# Cold restart (forces fresh login):
agentwatch stop && agentwatch start
Notes:
- Continuity is bounded by the normal 24h session expiry; a restart never extends it. A session already past 24h is dropped regardless.
- The first restart after upgrading to a build that added login preservation logs you out once (the old daemon writes the pre-upgrade snapshot format, which the new daemon discards). Subsequent restarts preserve login normally.
Can't login remotely¶
Remote login uses the same credentials as local:
- Ensure tunnel is connected
- Try local login first to verify credentials
- Check for special characters in password
Detection Issues¶
Wrong state detected¶
If Claude Code shows as Idle when Working (or vice versa):
-
Enable debug mode:
-
Restart daemon:
-
Reproduce the issue and check captures:
-
Report the issue with the capture file
Program not detected¶
If showing "Unknown" or wrong program:
-
Check tmux session has content:
-
Ensure program is running (not just a shell):
Spinner characters not recognized¶
New spinner characters may need adding. Check if your Claude Code version uses new spinners:
# Look for spinner-like characters in capture
cat ~/.cache/agentwatch/captures/*/capture_*.txt | grep -o '[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏✽✳✢✶✻·]'
Report any unrecognized spinner characters.
Hook Issues¶
Hooks not firing¶
-
Check hook configuration:
-
Enable hook logging:
-
Check logs for hook activity:
Webhook errors¶
-
Test endpoint manually:
-
Check timeout:
-
Check for SSL issues (if HTTPS):
Shell hooks fail silently¶
-
Test command directly:
-
Check command permissions:
-
Enable dry run to see what would execute:
Tunnel Issues¶
Tunnel not connecting¶
-
Check daemon status:
-
Verify device token:
-
Check tunnel process:
-
View tunnel logs:
Can't reach remote URL¶
-
Test local first:
-
Check DNS resolution:
-
Verify tunnel is running:
Web Viewer Issues¶
Black screen / no terminal¶
-
Check session exists:
-
Check capture works:
-
Check browser console for JavaScript errors
Keys not sending¶
- Ensure you're the driver (check header badge)
- Click in terminal area to focus
- Check connection (status indicator should be green)
Slow/laggy¶
- Reduce quality in viewer settings
- Check network:
- Reduce FPS in config:
Coding Session Issues¶
agentwatch session commands fail¶
The agentwatch session ... CLI talks to the running daemon's /api
endpoints. If commands fail:
-
Verify the daemon is running:
-
Check the API token exists:
-
Try a simple read against the daemon:
Session limit reached¶
Default limit is 3 sessions. Increase in config:
Permission errors on session new¶
Check allowed_workdirs:
Getting Help¶
If you can't resolve an issue:
-
Check existing issues: GitHub Issues
-
Gather diagnostic info:
-
Open a new issue with:
- What you expected
- What actually happened
- Steps to reproduce
- Diagnostic output above