
# Limits and quotas

The table below is every numeric limit in agc and Agent Cloud that an app or an agent can run into. Each value is read from its source line when this page is generated, so a changed limit can't go stale without the generator failing.

```bash
agc ship
```

A snapshot over the limit fails before anything is sent:

```json
{"ok":false,"product":"agent.cloud","command":"ship","error":{"retryable":false,"code":"ship.too_large","message":"The compressed snapshot exceeds 64 MiB.","fix":"Check the named command error. Exclude dependencies and build output in .gitignore or .agentcloudignore; use [[asset]] for large build inputs, then retry."},"next":[{"cmd":"agc help manifest","why":"snapshot ignore rules and large build inputs"}]}
```

## Reference

Source paths are under `packages/`. Where crossing a limit has its own error code, it's listed.

<!-- generated: limits -->
| Area | Limit | Value | Error when exceeded | Source |
|---|---|---|---|---|
| Snapshot | Compressed snapshot | 64 MiB | `ship.too_large` | cli/src/snapshot-limits.ts:2 |
| Snapshot | Uncompressed archive (files before archive headers, too) | 320 MiB | `ship.too_large` | cli/src/snapshot-limits.ts:3 |
| Snapshot | Snapshot upload body (control, the same compressed limit) | 64 MiB | `ship.too_large` | cli/src/snapshot-limits.ts:2 |
| Ship | Ship request body (migrations travel in it) | 64 MB | `request.too_large` | control/src/request-limits.ts:17 |
| Ship | `--fixes` text | 200 characters | `ship.bad_fixes` | control/src/ship.ts:969 |
| Ship | `--idempotency-key` | 1 to 256 characters of letters, digits and `._:%/-` | `ship.bad_idempotency_key` | control/src/ship.ts:616 |
| Ship | Automatic idempotency key lifetime | 24 hours (an explicit key never expires) | – | control/src/ship.ts:621 |
| Ship | How long `agc ship` and `agc wait` follow an operation before exit 20 | 10 minutes | `ship.still_running` | cli/src/commands/ship.ts:976 |
| Ship | Build time | 30 minutes | `ship.build_timeout` | control/src/ship.ts:2257 |
| Ship | `[service.web] cross_origin` paths | at most 20 | `ship.bad_cross_origin` | control/src/ship.ts:1111 |
| Ship | Worker `command` | 300 characters | `ship.bad_request` | control/src/ship.ts:909 |
| Ship | `[service.worker] instances` (agc clamps to this range) | 1 to 4 | – | cli/src/manifest-schemas.ts:39 |
| Ship | Per-app ceiling on Agent Cloud's own cloud (whole release) | 0.5 CPU, 4 GiB | `ship.over_cap` | control/src/resources.ts:15 |
| Assets | Assets per app manifest | 8 | `ship.too_many_assets` | cli/src/context.ts:128 |
| Assets | One asset, compressed | 256 MB | `ship.asset_too_big` | control/src/assets.ts:12 |
| Assets | All assets of one app | 1 GiB (1024 × 1024 × 1024 bytes) | `asset.app_full` | control/src/assets.ts:13 |
| Assets | Upload chunk | 8 MB | `asset.chunk_too_big` | control/src/assets.ts:11 |
| Requests | JSON request body (default route) | 16 MB | `request.too_large` | control/src/request-limits.ts:17 |
| Requests | Body of a route read before the caller is known (`/v1/agents`, `/auth/…`) | 64 KB | `request.too_large` | control/src/request-limits.ts:17 |
| Requests | Chunked body with no Content-Length | 64 KB | `request.too_large` | control/src/request-limits.ts:17 |
| Requests | agc's wait for an ordinary control request | 10 s | `control.timeout` | cli/src/control.ts:136 |
| Data | Rows `agc db query` returns (mirror) | 100 | – | cli/src/commands/db.ts:16 |
| Data | Rows `agc db query --env prod` returns | 100 | – | control/src/inspect.ts:1140 |
| Data | Statement timeout, production read | 5 s | – | control/src/inspect.ts:1153 |
| Data | Invariant statement timeout in `agc check` | 30 s | – | cli/src/commands/check.ts:219 |
| Import | One dump | 5 GiB | `import.too_large` | control/src/imports.ts:15 |
| Import | Migration files an import records | 300 | `import.too_many_migrations` | control/src/imports.ts:92 |
| Import | Upload part | 8 MB | – | control/src/imports.ts:14 |
| Mirror | `[mirror] expire_idle` default | 3 days | – | cli/src/manifest.ts:87 |
| Mirror | App must answer its health path after start | 60 s | `mirror.app_not_ready` | cli/src/mirror.ts:1229 |
| Release | Web and private services must answer ready (rehearsal and release) | 180 s by default; `[release] start_within` raises it up to 600 s | – | runner/src/release.ts:775 |
| Mirror | Mirror name | 41 characters (lowercased branch name) | – | cli/src/commands/mirror.ts:328 |
| Approvals | Approval expiry | 24 hours | `ship.approval_expired` | control/src/store.ts:1464 |
| Approvals | First-release budget (`--budget`) | 5 to 1000, a whole number | `approval.bad_budget` | cli/src/commands/approve.ts:53 |
| Approvals | `agc decline --why` | 5 characters (longer is cut) | – | cli/src/commands/approve.ts:23 |
| Identity | Unclaimed agent's deadline to be connected | 7 days | – | control/src/store.ts:405 |
| Identity | Connected agent unused | 30 days, then expired | – | control/src/store.ts:406 |
| Identity | Connected agent's lifetime | 90 days after connecting | – | control/src/store.ts:407 |
| Identity | Deploy key expiry (chosen in the console) | 1 to 90 days | – | control/src/console.ts:1695 |
| Identity | Hosted builder's deploy key | 90 days | – | control/src/builder.ts:17 |
| Identity | Task token lifetime | 5 to 60 minutes | `token.bad_request` | control/src/agents.ts:21 |
| Identity | Live task tokens per key | 20 | `token.limit` | control/src/agents.ts:23 |
| Identity | Unclaimed apps on Agent Cloud, all agents together (default) | 30 | `app.too_many_unclaimed` | control/src/app.ts:1677 |
| Identity | Agents holding unclaimed apps (default) | 20 | `agents.too_many` | control/src/app.ts:1676 |
| Identity | Unclaimed apps per network address a day (default) | 10 | `app.too_many_today` | control/src/network-limits.ts:9 |
| Init | App name | 3 to 40 lowercase letters, digits and hyphens (38 in the middle) | `init.name_needed` | cli/src/commands/init.ts:1165 |
| Init | `--prompt` | 1 to 4000 characters | `init.bad_prompt` | cli/src/commands/init.ts:1596 |
| Email | Messages an hour, production | 300 (mirrors and rehearsals: 3000) | `email.rate` | control/src/email.ts:124 |
| Email | Messages a day, one production token | 1000 | `email.rate` | control/src/email.ts:125 |
| Email | Real sends a day, one app | 100 | `email.rate` | control/src/email.ts:127 |
| Email | Real sends a day, all apps together | 300 | `email.rate` | control/src/email.ts:126 |
| Email | `subject` | 300 characters, one line | `email.bad_subject` | control/src/email.ts:269 |
| Email | `text` | 50,000 characters | `email.bad_text` | control/src/email.ts:270 |
| Email | `key` | 1 to 200 of letters, digits and `._:/-` | `email.bad_key` | control/src/email.ts:123 |
| Sign-in | Code lifetime | 60 s, once | – | control/src/app-signin.ts:210 |
| Sign-in | Sign-in email links an hour (per address and app / per network address / per app) | 3 / 20 / 200 | – | control/src/app-signin.ts:323 |
| Sign-in | Pending sign-in cookie | 30 minutes | – | control/src/app-signin.ts:203 |
| Logs | One log line | 2000 characters | – | control/src/logs.ts:17 |
| Logs | Lines `--grep` scans per call | 10,000 | – | control/src/logs.ts:18 |
| Feedback | Reports a day, one person | 20 | `feedback.too_many` | control/src/feedback.ts:82 |
| Feedback | Title | 3 to 120 characters | `feedback.bad_title` | control/src/feedback.ts:87 |
| Feedback | Body | 20,000 characters | `feedback.too_long` | control/src/feedback.ts:88 |
| Domains | Custom domains per app | 5 | `domain.too_many` | control/src/custom-domains.ts:52 |
| Delete | Restore window after delete | 30 days | – | control/src/delete.ts:32 |
| Delete | Deleted app's name held | 365 days | `app.name_reserved` | control/src/delete.ts:33 |
| Previews | Previews per app | 3 | `preview.quota` | control/src/previews.ts:7 |
| Previews | Idle expiry | 72 hours | – | control/src/previews.ts:8 |
| Previews | Hard expiry | 7 days | – | control/src/previews.ts:9 |
| Tasks | Owner's lease | 15 minutes | – | control/src/work-tasks.ts:43 |
| Tasks | `--outcome` | 4000 characters | – | control/src/work-tasks.ts:50 |
| Tasks | `--exception` | 2000 characters | – | control/src/work-tasks.ts:51 |
| Tasks | A verifier's hold on a release | 30 minutes | – | control/src/verifier.ts:13 |
| Tasks | `agc work list --limit` | 1 to 100 | `work.bad_request` | cli/src/commands/work.ts:292 |
| Verify | One try at a goal | 6 minutes, two tries | – | cli/src/commands/verify.ts:89 |
| Updates | Automatic update check | once an hour (3,600,000 ms), sooner after `x-agc-latest` | – | cli/src/update.ts:21 |
<!-- /generated: limits -->

### Limits that depend on the target

On an organization's own target (AWS or a platform target), the owner sets a cap on what one app may ask for and picks the node size. `ship.over_cap` and `ship.no_room` name the numbers and who can raise them. The per-app ceiling in the table applies on Agent Cloud's own cloud.

## Agent notes

- MiB and MB: agc's snapshot limits are in MiB (1,048,576 bytes); control's upload caps and asset limits are written as `MB` in messages but computed as 1024 × 1024 bytes too.
- The 10-minute follow is agc's patience, not the operation's: the release keeps going on Agent Cloud. `agc wait <op>` picks it up.
- Production queries are capped at 100 rows and 5 seconds. Aggregate in SQL (`count`, `sum`, `GROUP BY`) instead of fetching rows.
- Email limits count per app and across all apps; a message held by a daily cap is sent when you retry the same key later.

## Related

- [Error code catalog](/docs/reference/error-code-catalog.md)
- [What goes into a snapshot](/docs/build/what-goes-into-a-snapshot.md)
- [Large build inputs (assets)](/docs/build/what-goes-into-a-snapshot.md#large-build-inputs-assets)
- [Sending email](/docs/build/sending-email.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "reference/limits-and-quotas: <what is wrong>" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
