Debug Guide
Run the health check first
Section titled “Run the health check first”snippbot doctorThis checks Python version, disk space, port availability, database integrity, API key presence, and server connectivity. Use --fix to attempt automatic resolution:
snippbot doctor --fixLog files
Section titled “Log files”All logs are written to ~/.snippbot/logs/:
| File | Contents |
|---|---|
daemon.log | Main daemon — all requests, errors, task lifecycle |
executor.log | Task execution — agent prompts, tool calls, outputs |
scheduler.log | Scheduler — job triggers, run outcomes |
channel.log | Channel adapter — webhook events, routing |
Follow logs live:
tail -f ~/.snippbot/logs/daemon.logtail -f ~/.snippbot/logs/executor.logIncrease verbosity:
snippbot config set log_level debugsnippbot stop && snippbot startCheck daemon status
Section titled “Check daemon status”snippbot status
# Or directly:curl http://localhost:18781/healthIf the daemon isn’t running:
snippbot start# If it crashes on start, check:tail -20 ~/.snippbot/logs/daemon.logConnectivity checks
Section titled “Connectivity checks”-
Is the API reachable?
Terminal window curl http://localhost:18781/health# Expected: {"status": "ok", ...} -
Is auth working?
Terminal window curl http://localhost:18781/api/auth/validate \-H "Authorization: Bearer snip_your_key"# Expected: {"valid": true, ...} -
Can the AI provider be reached?
Terminal window # Test Anthropic directlycurl https://api.anthropic.com/v1/messages \-H "x-api-key: $ANTHROPIC_API_KEY" \-H "anthropic-version: 2023-06-01" \-H "content-type: application/json" \-d '{"model":"claude-haiku-4-5-20251001","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}' -
Is the channel adapter running?
Terminal window snippbot channel statuscurl http://localhost:18790/health
Database inspection
Section titled “Database inspection”All databases are standard SQLite files. Inspect them with any SQLite client:
# Install sqlite3 if needed (usually pre-installed)sqlite3 ~/.snippbot/snippbot.db
# Useful queries:.tables # list all tablesSELECT * FROM projects LIMIT 5; # recent projectsSELECT * FROM tasks WHERE status='failed'; # failed tasks.quitCheck database integrity:
sqlite3 ~/.snippbot/snippbot.db "PRAGMA integrity_check;"# Expected: okEvent log
Section titled “Event log”All events are written to ~/.snippbot/events.jsonl:
# Watch events in real timetail -f ~/.snippbot/events.jsonl | python3 -m json.tool
# Filter for specific event typesgrep '"task.completed"' ~/.snippbot/events.jsonl | tail -10
# Count events by typecat ~/.snippbot/events.jsonl | python3 -c "import sys, json, collectionscounts = collections.Counter()for line in sys.stdin: try: counts[json.loads(line)['type']] += 1 except: passfor t, c in counts.most_common(20): print(f'{c:5d} {t}')"Reset and restore
Section titled “Reset and restore”If nothing else works, reset to a clean state (a backup is always created first):
# List available backupssnippbot reset --list-backups
# Soft reset — re-run setup wizard, keep all datasnippbot reset --soft
# Full resetsnippbot reset
# Restore from backupsnippbot reset --restore pre-install-20260301-120000Getting more help
Section titled “Getting more help”- Check Common Errors for specific error messages
- Check FAQ for usage questions
- Open an issue at github.com/snippbot/snippbot/issues