---
title: "Errors and retries"
description: "HTTP status semantics and the retry rules that prevent duplicate effects."
image: "https://help.agent.mq/og.svg"
---

> Documentation Index
> Fetch the complete documentation index at: https://help.agent.mq/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and retries

## Status codes

| Status | Meaning | Caller action |
| --- | --- | --- |
| `400` | Invalid input or device authorization polling state | Correct the request or branch on the device error code |
| `401` | Missing, expired, revoked, or invalid credential | Reauthenticate; do not retry unchanged |
| `402` | Managed credit cannot cover the reservation | Add credit or use a BYO connection |
| `403` | Authenticated but not permitted | Change role, scope, or operation configuration |
| `404` | Resource absent or intentionally hidden across an app boundary | Verify the application and resource ID |
| `409` | Stale revision, idempotency conflict, or invalid state transition | Read current state before deciding |
| `422` | Workflow or schema refused | Correct the YAML, task type, or input |
| `429` | Admission limit reached | Honor the limit; retry only after capacity returns |
| `5xx` | AgentMQ or an upstream dependency failed | Retry a safe read with backoff; reconcile uncertain effects |

## Retry rule

Never retry a write by inventing a new idempotency key after an ambiguous response. Reuse the original key to recover the recorded result, or reconcile the original attempt when its outcome is `UNKNOWN`.

## See also

- [Troubleshooting](/operate/troubleshooting)
- [Identifiers, states, and limits](/reference/identifiers)

Source: https://help.agent.mq/operate/errors/index.mdx
