Reference
Error codes, and what to do with them.
An authorization layer is only as useful as its failure semantics. Every error below is a stop unless it says otherwise.
Response shape
4xx / 5xx
{
"error": "invalid_request",
"detail": { "action": "tool required" }
}The table
| HTTP | error | Meaning | Retry | Action |
|---|---|---|---|---|
| 401 | missing_token | No credential presented. | no | Send Authorization: Bearer <key>. |
| 401 | invalid_token | The key does not match any stored hash. | no | Check the key; it is shown once at issue. |
| 401 | revoked_token | The key was revoked. | no | Issue a new key. |
| 401 | expired_token | The key is past its expiry. | no | Issue a new key or extend the expiry. |
| 403 | scope_denied | The key lacks the authorize scope, or asked for another client. | no | Issue a key scoped to that client. |
| 403 | tool_not_permitted | The tool is outside the key's allowlist. | no | Use a permitted tool or widen the allowlist. |
| 403 | client_paused | The client is paused in the console. | no | Resume the client. |
| 403 | client_not_found | The key references a client that no longer exists. | no | Reissue the key. |
| 404 | not_found | Verification: no record with that hash or decision id. | no | Check the identifier. |
| 410 | expired | Evidence pack share link has expired. | no | Generate a new pack. |
| 422 | invalid_request | Body is not valid JSON or a required field is missing. | no | Fix the request; detail names the field. |
| 429 | rate_limited | Local or global window exhausted. retry_after is in seconds. | yes | Honour retry-after, then back off. |
| 500 | internal_error | Unexpected failure. No decision was returned. | yes | Treat as deny; retry with the same idempotency key. |
Retries and idempotency
Send an idempotency_key with every request that might be retried. A replay returns the original decision with replayed: true and the same record hash, so a retry can never produce two authorizations for one action.
A retry is not a new decision. If the first call returned deny, retrying with a fresh idempotency key asks a new question and may get a different answer. Do that deliberately, never as error handling.
