# HTTP & MCP JSON-RPC Error Codes Reference — AlwaysOn Memory

> AlwaysOn Memory returns standard HTTP status codes (`400`, `401`, `402`, `403`, `404`, `409`, `413`, `429`, `503`), structured domain `code` strings on tool and API errors, and JSON-RPC error codes (`-32700`, `-32600`, `-32601`, `-32602`, `-32002`, `-32029`). Each response tells you what failed and how to recover.

- **Canonical HTML:** https://always-on.cloud/docs/reference/errors
- **Markdown Mirror:** https://always-on.cloud/docs/reference/errors.md
- **Public Docs MCP:** https://always-on.cloud/docs/mcp
- **Agent Skill:** https://always-on.cloud/skill.md
- **Last Updated:** 2026-12-01

## What do AlwaysOn Memory HTTP and application error codes mean?

Bad JSON or headers return `400`, auth and access errors return `401` or `403`, plan caps return `402`, missing targets return `404`, conflicts or stale export snapshots return `409`, oversized pages return `413`, quota or rate limits return `429`, and read-only maintenance returns `503`.

| HTTP | Code / JSON-RPC | Cause | How to Fix |
| --- | --- | --- | --- |
| `400` | JSON-RPC `-32700` / `-32600` (MCP) or `INVALID_JSON` (API) | Malformed JSON body, invalid JSON-RPC envelope, or unsupported `MCP-Protocol-Version`. | Check JSON syntax and use protocol `2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05`. |
| `401` | `{"error": ...}` + header `WWW-Authenticate: Bearer error="invalid_token"` | Missing, mistyped, expired, or revoked connection key or OAuth token. | Create a new connection key under **Connections** or re-approve OAuth. |
| `402` | `OAUTH_CLIENT_LIMIT_REACHED` / OAuth `access_denied` | Workspace reached its plan limit for browser-approved apps (on `/oauth/authorize` or `/oauth/token`). | Revoke an unused app under **Connections** (saved memories stay) or upgrade. |
| `402` | `TEAM_PLAN_REQUIRED` / `PLAN_SEAT_LIMIT_REACHED` / `SEAT_PAUSED_DOWNGRADE` (`-32002`) | Action needs a Team plan, seat cap is reached, or a teammate seat paused after downgrade. | Upgrade to Team in **Settings** to add or resume seats and project grants. |
| `403` | `PROJECT_ACCESS_DENIED` / `OWNER_REQUIRED` / `PRIVATE_HANDOFF` | Team member lacks a grant for that project, tried an owner-only action, or accessed another user's private handoff. | Ask the workspace owner to grant `read`/`write` access under **Settings → Members**, or mark handoffs `shared: true`. |
| `403` | `CROSS_TENANT_FORBIDDEN` / `RESOURCE_MISMATCH` | Connection key or OAuth token belongs to a different workspace slug or resource audience. | Match the `/t/<slug>/mcp` URL to the workspace that created the key or token. |
| `404` | `PAGE_NOT_FOUND` / `HANDOFF_NOT_FOUND` / `PATCH_TARGET_NOT_FOUND` | Requested page or handoff doesn't exist, expired, or `find` text didn't match. | Run `memory_explore`, `memory_query`, or `memory_read_page` to check the exact path or text. |
| `409` | `PATH_TAKEN` / `HANDOFF_NOT_OPEN` / `EXPORT_PLAN_STALE` / `KEY_LIMIT_REACHED` | Path collision, already-closed handoff, workspace changed mid-export, or 25-key cap reached. | Use another path, click **Refresh plan** before downloading export parts, or revoke an unused key. |
| `400` / `413` | `PAGE_TOO_LARGE` / `CHECKSUM_MISMATCH` / `RESTORE_EXCEEDS_STORAGE_QUOTA` | Page exceeds single-page limit (64 KB Free / 256 KB Paid), restore file checksum failed, or restore exceeds plan storage. | Split large pages, re-download intact export parts, or upgrade before restoring. |
| `429` | `DAILY_REQUEST_QUOTA_EXCEEDED` / `DAILY_ROWS_READ_QUOTA_EXCEEDED` / `-32029` | Workspace hit its daily MCP request or SQLite rows-read limit. | Wait for `00:00 UTC` reset or upgrade. Dashboard export still works. |
| `429` | `DAILY_WRITE_QUOTA_EXCEEDED` / `DAILY_ROWS_WRITTEN_QUOTA_EXCEEDED` | Workspace hit its daily write count or SQLite row-write limit. | Reads and full export stay available; resets at `00:00 UTC`. |
| `429` | `QUOTA_EXCEEDED_PAGES` / `QUOTA_EXCEEDED_STORAGE` / `RESTORE_EXCEEDS_PAGE_QUOTA` | Saved page count or total storage limit reached. | Delete older memory pages, download a backup, or upgrade. |
| `429` | JSON-RPC `-32029` (no `code` field) | Repeat call on an already-exhausted Free workspace (short-circuit), or platform-wide daily capacity circuit breaker. | Wait for `00:00 UTC` reset; dashboard export remains available. |
| `429` | `RATE_LIMITED` / `/docs/mcp` `-32029` | Per-IP burst limit hit on auth/DCR (`RATE_LIMITED`) or public `/docs/mcp` (120 req/min/IP, JSON-RPC `-32029`). | Wait at least `Retry-After` seconds before retrying. |
| `503` | `MAINTENANCE_MODE` | Service is temporarily in read-only maintenance mode. | Reads and exports stay available; retry writes once maintenance ends. |

### Agent Context: Agent Retry & Backoff Rules

Classify errors before retrying any MCP request.

- **Don't auto-retry:** `400`, `401`, `402`, `403`, `404`, `409`, `413`, `QUOTA_EXCEEDED_PAGES`, `QUOTA_EXCEEDED_STORAGE`, `DAILY_REQUEST_QUOTA_EXCEEDED`, `DAILY_ROWS_READ_QUOTA_EXCEEDED`, `DAILY_WRITE_QUOTA_EXCEEDED`, `DAILY_ROWS_WRITTEN_QUOTA_EXCEEDED`, or platform-capacity `-32029`. Report the exact code and fix to the user.
- **Retry after waiting:** HTTP `429 RATE_LIMITED` and `/docs/mcp` `-32029` — wait at least `Retry-After` seconds, max 2 retries.
- **Inspect `isError` on HTTP 200:** MCP `tools/call` domain failures return HTTP 200 with `result.isError = true` and JSON `{ ok: false, status, code, message }` inside `result.content[0].text`. Repeat calls after a Free workspace exhausts daily quota return HTTP 429 JSON-RPC `-32029` directly without calling the workspace Durable Object.

## Related Documentation

- [Plans & limits](https://always-on.cloud/docs/reference/plans-and-limits.md): Compare exact AlwaysOn Memory limits for Free ($0/mo), Pro Solo ($12/mo), and Team ($39/mo): memory pages, storage, daily MCP requests, browser-approved apps, and refunds.
- [MCP protocol](https://always-on.cloud/docs/reference/mcp-protocol.md): Technical specification for AlwaysOn Memory's Streamable HTTP MCP endpoints (/mcp, /t/<slug>/mcp, /docs/mcp), protocol versions, headers, and .well-known discovery.
- [Troubleshooting & FAQ](https://always-on.cloud/docs/troubleshooting.md): Direct answers to common AlwaysOn Memory questions: MCP setup, OAuth apps, plan limits, downgrades, 14-day self-serve refunds, security, and backups.
