AGENTO
v1.1.0 · Documentation
Documentation/Operate and debug/Errors & recovery

Errors & recovery

2026-10-15·source 4bebed4·4 min read·23 / 27

You will learn: Choose between correcting input, refreshing state, and checking the API.

Decide whether to fix, ask, refresh, or reconcile

An error code is useful only when it leads to the right next action. First distinguish startup exceptions from operation results. Invalid YAML rejects runtime creation; an expired choice is normally returned as an AgentResult with status: "error".

For a mapping/config error, stop and fix the contract. For invalid user input, explain the field constraint. For an expired selection, retrieve fresh choices. For 401/403, use your login/permission UX. For a potentially delivered write, reconcile its backend state before proposing another attempt.

Trace a timeout after approval

Imagine the booking POST is accepted, but the response is lost. Retrying a new invocation could create another booking. Check error.details.executionMayHaveOccurred, your idempotency record, and the API's operation-status lookup. Do not treat an error result as proof of zero side effects.

By contrast, a missing field before any tool call has not sent that write. Use meta.toolCalls and lifecycle events to understand the stage, while treating uncertainty conservatively when the runtime reports it.

Window exhaustion returns RATE_LIMITED; the session lifetime cap returns RATE_SESSION_LIMIT. A downstream 429 returns TOOL_RATE_LIMITED. These need different operational fixes: host budgeting versus upstream capacity.

Use the tables below as a lookup after you identify the failing boundary. Troubleshooting starts from symptoms.

Error result shape

Runtime operations return errors as data:

{
  "status": "error",
  "error": {
    "code": "AUTH_REJECTED",
    "category": "AUTH",
    "message": "Upstream API rejected the request.",
    "details": {
      "status": 401
    }
  }
}

Configuration/startup failures throw AgentRuntimeError because the runtime could not safely initialize.

Categories

AgentRuntimeError derives categories from the code prefix:

CONFIG
MODEL
ROUTING
INPUT
SESSION
AUTH
TOOL
DEPENDENCY
CONFIRMATION
RATE
INTERNAL

Common configuration errors

CodeMeaning / next action
CONFIG_INVALIDYAML/shape is invalid or multiple config sources were supplied.
CONFIG_SCHEMA_INVALIDA tool JSON Schema is unsupported/unsafe.
CONFIG_SECRET_MISSINGRequired provider/service secret is absent.
CONFIG_AUTH_INVALIDUnsafe auth/transport configuration.
CONFIG_URL_INVALIDTool URL violates runtime safety rules.
CONFIG_MAPPING_INVALIDMapping conflicts or reads undeclared data.
CONFIG_DEPENDENCY_INVALIDDependency target/source violates the contract.
CONFIG_DEPENDENCY_CYCLEAutomatic dependency graph is cyclic.
CONFIG_CONFIRMATION_INVALIDAn effectful tool lacks required confirmation.

Routing/model errors

CodeMeaning / next action
MODEL_NOT_CONFIGUREDchat()/AI presentation requires a model.
MODEL_PROVIDER_ERRORProvider boundary failed.
MODEL_RESPONSE_MALFORMEDProvider/model response could not be safely parsed.
MODEL_SCHEMA_VIOLATIONTool selection/arguments violated the expected schema.
MODEL_TOOL_SELECTION_FAILEDModel selected outside the allowed candidate set.
ROUTING_NO_MATCHNo tool matched while conversation mode is disabled.

Input/continuation errors

CodeMeaning / next action
INPUT_SCHEMA_VIOLATIONSupplied arguments violate tool schema.
INPUT_SELECTION_STALEPending selection expired or no longer matches context. Refresh options.
INPUT_SELECTION_INVALIDChoice is not from the current option set.
CONFIRMATION_STALEConfirmation expired or prepared operation/context changed. Rebuild the action.

Auth/session errors

CodeMeaning / next action
AUTH_REQUIREDRequired service credential is unavailable.
AUTH_REJECTEDDownstream API returned 401/403. Host decides login/permission UX.
SESSION_ID_INVALIDSession ID format is invalid.
SESSION_EXPIREDSession TTL expired or config changed. Start a fresh flow.
SESSION_CAPACITYIn-memory session capacity was reached. Use cleanup/shared storage.
SESSION_RUNTIME_DISPOSEDRuntime was disposed. Stop sending requests to it.

Tool/transport errors

CodeMeaning / next action
TOOL_ABORTEDHost cancellation/abort signal.
TOOL_TIMEOUTUpstream exceeded timeout.
TOOL_NETWORK_ERRORTransport failed before a safe response.
TOOL_REDIRECT_BLOCKEDUpstream attempted a redirect. Fix configured endpoint.
TOOL_CLIENT_ERRORNon-auth 4xx. Inspect API contract/business input.
TOOL_RATE_LIMITEDUpstream returned 429. Retry only under your policy.
TOOL_SERVER_ERRORUpstream 5xx. May participate in safe retries/circuit breaker.
TOOL_RESPONSE_MALFORMEDDeclared JSON response was malformed.
TOOL_OUTPUT_LIMITResponse exceeded byte ceiling.
TOOL_OUTPUT_SCHEMA_VIOLATIONResponse violated declared output schema.
TOOL_CIRCUIT_OPENCircuit breaker is open.
TOOL_EXECUTION_UNCERTAINA previous effect may have reached the backend. Reconcile before retrying.

Never retry an uncertain business effect blindly

If an error reports details.executionMayHaveOccurred: true or TOOL_EXECUTION_UNCERTAIN, do not equate “the client did not receive success” with “the backend did nothing.” Query operation state or reconcile using your idempotency/audit model.

Error messages are intentionally bounded

AGENTO avoids exposing arbitrary provider/API response bodies as error details. Keep sensitive operational logs in your own trusted infrastructure, not in user-facing messages.