Skip to main content
Errors use one envelope:
Branch on the HTTP status and error.code. When requestId is present, log it and include it when you contact support. Validation endpoints may add bounded issues with JSON Pointer paths. The outer error envelope remains the programmatic contract.

Error codes

Codes are lowercase snake_case. The shared vocabulary is: Individual resources add their own codes on top of these — for example missing_idempotency_key, handoff_conflict, operating_process_conflict, discovery_run_in_progress, invalid_agent_work_receipt, and direct_human_decision_action_required. Mutations also use idempotency_key_conflict for retry protection. Those are documented on each resource’s page. Branch on the HTTP status first and the code second, so an unfamiliar resource-specific code still routes to the right handling.

The MCP tool surface uses a different vocabulary

MCP tool errors are not these codes. That surface has its own set — invalid_input, auth_required, permission_denied, entity_not_found, stale_version, rate_limit_exceeded, server_error, and others — documented in the failure playbooks. The two vocabularies are not aliases of each other; do not map one onto the other in client code. Retry timing differs with the surface too: REST v1 sends Retry-After; the MCP edge sends X-RateLimit-Reset alongside X-RateLimit-Limit and X-RateLimit-Remaining. Honor whichever the response you are holding carries.