Common Errors
The AnvioError codes and recurring configuration mistakes, with what each means and how to resolve it.
2 min read
Anvio raises typed errors through AnvioError
(packages/core/src/errors/anvio-error.ts). Each error carries a
code, a default statusCode, and optional details. This page maps every code to its meaning
and typical cause. For step-by-step recovery of environment problems, see
Troubleshooting.
AnvioError codes
| Code | HTTP | Meaning | Typical cause |
|---|---|---|---|
VALIDATION_ERROR | 400 | Input failed schema validation | Malformed agent/skill/goal YAML, bad request body |
UNAUTHORIZED | 401 | Missing or invalid credentials | No/invalid JWT when auth is enabled |
FORBIDDEN | 403 | Authenticated but not permitted | RBAC denial, or a Soul Gate block |
NOT_FOUND | 404 | Referenced entity doesn't exist | Unknown session, agent, goal, or task id |
CONFLICT | 409 | Entity already exists | Creating a goal/task with a slug that's taken |
APPROVAL_REQUIRED | 422 | Action awaits human approval | A tool call gated by the approval workflow |
AGENT_RUNTIME_ERROR | 502 | The agent loop failed | Runtime crash, exhausted fallback chain |
MODEL_PROVIDER_ERROR | 502 | A provider call failed | Bad API key, provider outage, rate limit |
MEMORY_ERROR | 502 | Memory read/write failed | Unreachable memory backend at Level 3+ |
TOOL_EXECUTION_ERROR | 502 | A tool threw during execution | Failing shell/code tool, MCP server error |
INTERNAL_ERROR | 500 | Unexpected/unclassified failure | Bug — capture the stack and file an issue |
Error shape isn't uniform across the API yet
Not every REST controller wraps failures in an AnvioError with the matching HTTP status — some
return a soft { error: "..." } body with HTTP 200. See
API Error Codes for exactly which endpoints do which.
Recurring configuration mistakes
ANTHROPIC_API_KEY set alongside the claude-code runtime
The API key shadows the OAuth token and bills your Claude subscription as API credits. Remove the
key from .env when using the claude-code runtime,
or switch to the local runtime if you want to pay per-token. See
Runtime OAuth.
NATS connection refused at Level 1–2
You don't need NATS below Level 3. If you see this, either start the broker or confirm your workspace isn't configured for the distributed event bus. See Local Event Bus.
MCP server tools missing
Almost always a wrong launch command, missing credential env var, or an unapproved first call. Run
anvio mcp health and re-check the MCP Setup Guide.
Mock integrations in production
The ANVIO_*_MOCK flags (e.g. ANVIO_HONCHO_MOCK, ANVIO_ATROPOS_MOCK) return canned responses.
They're for development and tests — make sure they're unset in real deployments, or integrations
will silently no-op.
Last updated on