Troubleshooting — Problem Diagnosis

Authorization

401 — Invalid token

401 — Email not verified

403 — No access to the project

Workers and Bots

Worker does not respond

Status: "degraded"

Timeout (5 minutes)

Max turns reached

Watchdog disabled bot

Semantic search / RAG (Phase 71)

arc kb search returns an empty result for a fresh project

Cohere 401 Unauthorized

Cohere 429 Rate Limited

Latency tail >500ms

Frontend and Connectivity

WebSocket disconnects

SSE streaming does not work

CORS error

Message gets cut off

Database

"Database not initialized"

"Database locked"

Quick Reference

Problem First thing to check Quick fix
Bot does not respond /health or /ping Restart via CRM
401 Unauthorized Token creation time Log in again
403 Forbidden Project ownership Check owner_id
Degraded status consecutiveFailures Wait for the watchdog
Timeout 5m Task complexity Break into smaller steps
Bridge error google_auth in /health arc memory refresh
CORS blocked CRM_ALLOWED_ORIGINS Add the origin
WebSocket disconnect JWT lifetime (24h) Refresh the page

Useful Diagnostic Commands

# Health checks
curl -s http://localhost:19210/api/master/health | jq .
curl -s http://localhost:19211/api/child/health | jq .

# Check tmux sessions
tmux list-sessions

# Master Bot logs
tmux capture-pane -t citadel-master -p | tail -20

# Child Bot logs
tmux capture-pane -t ws-arc-v2 -p | tail -20

# Check ports
ss -tlnp | grep '192[0-9][0-9]'

# Database state
sqlite3 data/citadel.db "PRAGMA integrity_check;"

Doc enforcement (Phase 49.1+)

git push is blocked with "doc-coverage check failed"

The pre-push hook requires doc updates when code changes. STDERR shows exactly which files need updating.

Quick fixes:

Hook does not run on a fresh clone

bash scripts/setup-hooks.sh   # one-time per clone
git config core.hooksPath     # verify it equals ".githooks"

GitHub Integration (Phase 49.3)

Webhook returns 401

Sidebar GitHub feed is empty

Rate limit "429 Rate limited"

Cap = 100 req/min/project. Raise it in shared/routes/github.ts:RATE_MAX.

More details: GitHub Integration Setup.