// operate · runbooks
Operational runbooks
Short procedures for common incidents. Each runbook starts with diagnosis, narrows the likely cause and ends with recovery evidence.
Gateway is down or stuck
- Check state
See whether the registered process still exists.
okami gateway --status okami doctor --lint - Stop safely
If the PID is stale, stop also clears old state.
okami gateway --stop - Run in foreground
Use live logs to capture token, route or provider failures.
okami gateway --foreground
Background process is stuck
okami ps -w workspaces/defaultlist known processesokami process log <id> -n 120read redacted logsokami process signal <id> INTtry cooperative shutdownokami process kill <id>kill process group or container when neededokami process clean --ttl-hours 24 --dry-runinspect pruning without deletingProvider failure or rate limit
| signal | action |
|---|---|
| missing auth | okami auth list and okami login <provider> |
| slow or weak model | okami tune to inspect failures by model |
| rate limit | temporarily switch default_provider or reduce parallelism |
| provider CLI broken | run the official CLI outside Okami, then okami doctor |
MCP does not appear
- Validate config
Confirm command, args and env.
okami config show okami mcp - Test credentials
Tokens should come from
.env, never hardcoded YAML.env | grep GITHUB_TOKEN okami doctor --lint - Reduce surface
Disable MCP servers one at a time until the failing bootstrap is isolated.
okami tools
Memory or persona causes bad behavior
okami memory search "problem term"find relevant factsokami memory forget <id>remove a specific entryokami persona-loglist persona/voice changesokami persona-rollback 1undo the last evolutionokami replay --jsonconfirm whether the issue came from memory, tool or providerHTTP API returns 401 or will not boot
okami config set OKAMI_API_TOKEN <strong-token>define required tokenokami serve --host 127.0.0.1 --port 8765boot locally and fail-closedcurl -s http://127.0.0.1:8765/healthcheck unauthenticated healthcurl -s http://127.0.0.1:8765/chat -H 'Authorization: Bearer <strong-token>' -H 'content-type: application/json' -d '{"message":"ping"}'test auth and payload
