AAnvio
Runbook

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

CodeHTTPMeaningTypical cause
VALIDATION_ERROR400Input failed schema validationMalformed agent/skill/goal YAML, bad request body
UNAUTHORIZED401Missing or invalid credentialsNo/invalid JWT when auth is enabled
FORBIDDEN403Authenticated but not permittedRBAC denial, or a Soul Gate block
NOT_FOUND404Referenced entity doesn't existUnknown session, agent, goal, or task id
CONFLICT409Entity already existsCreating a goal/task with a slug that's taken
APPROVAL_REQUIRED422Action awaits human approvalA tool call gated by the approval workflow
AGENT_RUNTIME_ERROR502The agent loop failedRuntime crash, exhausted fallback chain
MODEL_PROVIDER_ERROR502A provider call failedBad API key, provider outage, rate limit
MEMORY_ERROR502Memory read/write failedUnreachable memory backend at Level 3+
TOOL_EXECUTION_ERROR502A tool threw during executionFailing shell/code tool, MCP server error
INTERNAL_ERROR500Unexpected/unclassified failureBug — 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.

Edit on GitHub

Last updated on

On this page