Skip to content

Error Codes

A2EErrorCode (Core)

The base error codes returned in A2EError messages:

CodeDescriptionRetryable
parse_errorCould not parse the NDJSON lineNo
runtime_errorGeneric runtime failureYes
invalid_messageMessage structure is invalidNo
version_mismatchProtocol version not supportedNo
unauthorizedAuthentication failedNo
schema_violationMessage failed Pydantic validationNo
timeoutOperation timed outYes
out_of_memoryServer ran out of memoryYes
sandbox_crashSandbox environment crashedYes

ToolErrorCode

CodeDescriptionRetryable
UNKNOWN_TOOLTool name not found in registryNo
TOOL_DENIEDTool not allowed by policyNo
TOOL_ERRORTool execution failedYes

SkillErrorCode

CodeDescriptionRetryable
UNKNOWN_SKILLSkill name not foundNo
SKILL_ERRORSkill execution failedYes
RUNTIME_ERRORRuntime error during skillYes

ChainErrorCode

CodeDescriptionRetryable
CHAIN_CYCLEDAG contains a cycleNo
CHAIN_NODE_ERRORA node in the chain failedYes

MCPErrorCode

CodeDescriptionRetryable
server_not_foundMCP server ID not registeredNo
unavailableMCP server is not connectedYes
tool_not_foundTool not found on any MCP serverNo
resource_not_foundResource URI not foundNo
prompt_not_foundPrompt name not foundNo
transport_errorMCP transport connection errorYes
protocol_errorMCP protocol violationNo
sampling_refusedAgent refused LLM sampling requestNo
capability_missingMCP capability not availableNo

Error Response Format

All errors are returned as A2EError messages:

json
{
  "a2e": "1.0",
  "type": "error",
  "id": "<uuid>",
  "ts": 1716123456.789,
  "req_id": "<original-request-id>",
  "code": "tool_error",
  "message": "Tool 'write_file' failed: Permission denied",
  "detail": {
    "tool_name": "write_file",
    "path": "/root/secret.txt",
    "os_error": "EACCES"
  },
  "retryable": true,
  "capability_name": "tools"
}

Client Error Handling

On the client side, A2EError responses are wrapped in A2EClientError:

python
try:
    result = client.rpc(request, timeout=10)
except A2EClientError as e:
    print(f"Code: {e.code}")
    print(f"Message: {e.message}")
    print(f"Retryable: {e.retryable}")
    print(f"Detail: {e.detail}")
    print(f"Capability: {e.capability_name}")
    print(f"Events before error: {len(e.events)}")

Retry Strategy

Code PatternStrategy
retryable=TrueExponential backoff retry (1s, 2s, 4s, ...)
retryable=FalseDo not retry — fix the request
timeoutIncrease timeout and retry
unauthorizedFix auth_token, do not retry
version_mismatchUpdate protocol version, do not retry

A2E Protocol v1.0 — Released under the MIT License.