
# Release governance

An app's autonomy (`routine` or `watch`) decides which releases go live on their own; its monthly budget is what you plan to spend. Set both in the app's **Settings** > **Releases and cost**, or have your agent run `agc limits set`. `agc limits` shows the result.

## Ask your agent

```text
Set this app to ask me before every release, and set its monthly budget to 50.
```

The agent runs `agc limits set --budget 50 --autonomy watch` and gives you an `/a/<id>` link; you approve the change there, and nothing changes until you do.

## Do it in the console

| To do this | Go here |
|---|---|
| Change what waits for you, or the budget | The app's **Settings** > **Releases and cost** > **Release policy** or **Monthly budget** > **Save changes** |
| Decide a waiting release | The `/a/<id>` link the agent relayed, or the app's **Releases** > **Needs you** |
| Decide a limits change your agent asked for | The `/a/<id>` link the agent relayed |
| See or release held checks | The app's **Releases** > **Verifications** > **Let go** |

The app's owner and the organization's owners can change these. Everyone else sees the card read-only.

## How it works

A release rehearses on a fresh branch of production when it has smoke checks, invariants, pending migrations or a worker, serves its own `/mcp`, or will ask a person; with none of those it skips rehearsal, so declare checks for behavior that must be tested.

An app's first release goes live on its own, with `routine` autonomy and a default budget, unless the app is set to `watch` or runs on your organization's own deployment target; then it asks a person, who claims the app and sets both.

### What always asks a person

Whatever the policy, these releases wait, and the approval page shows the reason under **Why it waits**:

| A release that | Note |
|---|---|
| Runs a flagged migration | A `DROP` (other than `DROP NOT NULL` or `DROP DEFAULT`), `TRUNCATE`, `DELETE`, a column type change, an `UPDATE` without `WHERE`, or custom SQL |
| Removes the live worker service | |
| Removes `[storage]` while production's bucket still exists | Its files would stay, unreachable |
| Changes how people sign in | e.g. "Changes how people sign in: edge → Agent Cloud." |
| Opens a new `[auth] public` path on an app behind the edge | The reason names each path |
| Removes or changes a held check | |

### Who can approve

The app's owner, while still a member of the organization, and any organization owner; a builder approves only apps they own. Anyone else who opens the link sees "Not yours to approve", naming the people who can.

### Held checks

A held check is one Agent Cloud keeps because it earned it:

| Held because | Shown as |
|---|---|
| It stopped a release in rehearsal by catching a real problem | "it stopped v<N>" |
| It arrived with a release shipped with `--fixes` | "added with the fix for: …" |

A later release that removes or changes a held check waits for a person, and the approval page shows **Held verifications this release changes** with the held version beside the new one.

**Let go** on the **Verifications** tab deletes the hold, so the next ship may change or remove that check without asking. Do it only when you know why the check no longer applies, such as a retired table; otherwise approve the one release that changes it, where you see the diff.

### Console-only decisions

A release that loosens a held check, or whose migration drops or empties data, removes a constraint or runs custom SQL (`DO` blocks, `EXECUTE`), can't be approved by replying to the agent in its session, only on the `/a/<id>` page. A change to the budget or autonomy that an agent asked for is decided only there too.

### The approval page

`/a/<id>` requires sign-in (company sign-in first, where required). While the release waits, it shows **Why it waits** (with a **Change policy** link), any **Public paths** it opens, the **Rehearsal** checks, the **Database change** with every migration's SQL, any held checks it changes, the **Code** summary and a timeline. The decision column shows:

| Release | Decision column |
|---|---|
| A first release that asks | **Claim <app> and approve its first release**, with **Monthly budget** (default 25), **What agents may release on their own** (**Code and most migrations** or **Nothing**), **Claim into** (when you're in several organizations; an app can't move afterwards), and the purpose of the agent that made it if you connect it |
| Any other | **Approve v<N>** and **Decline** |
| Both | **Note for the agent**, which it sees if you decline, and **Expires**: when the question ends if nobody decides |

An approval expires 24 hours after it's asked, and a newer ship of the same app supersedes it.

## Autonomy and budget

Both are stored on Agent Cloud, never in the repo, and a snapshot can't change them. `agc status` shows them as `data.autonomy` and `data.budget`; `agc limits` adds the app's instances, storage cap, where it runs and `console_url`.

| | **Code and most migrations on their own** (`routine`, default) | **Every release asks you** (`watch`) |
|---|---|---|
| Code-only release that passes its checks | Goes live on its own | Asks a person |
| Release with unflagged migrations (e.g. `CREATE TABLE`, `ADD COLUMN`) | Goes live on its own | Asks a person |
| Flagged migration, held-check change, sign-in change, worker removal, and the other cases above | Asks a person | Asks a person |
| Re-release after a secret changes | Goes live on its own | Asks a person |

Use `watch` for anything that handles money or personal data until you trust the agent's checks; it costs one approval per release. `routine` is the right default for most apps because destructive changes ask anyway. The flag check reads statements, so an `UPDATE` with a `WHERE` goes out under `routine` even when it overwrites values, and an agent's code reaches production without a person ([What agents can and can't do](/docs/concepts/what-agents-can-and-cant-do.md)).

**The budget** is what you plan to spend on the app, in whole dollars from 5 to 1000 (steps of 5 in the console). It is shown with the app and doesn't cap spending; Agent Cloud is free during the beta.

### Changing them with agc limits

A person changes them in **Releases and cost**, or through their own Builder agent:

```bash
agc limits
agc limits set --budget 50 --autonomy watch
```

Either flag, or both. From a Builder agent or a Builder deploy key, `set` exits 10 with `limits.approval_required` and `data.approval.url`, an `/a/<id>` page where the app's owner or an organization owner approves or declines exactly those values within 24 hours; nothing changes before that. While it waits, `agc limits` shows it under `asked`; a different ask replaces it, and asking for the current values answers `unchanged: true`. Every change is recorded as a `settings.changed` app event naming the person.

### Where they're set at a first approval

When a first release asks, the approver sets them on the console's approval page, or in the agent's session, where the person's reply maps to `agc approve`'s first-release-only flags ([CLI reference](/docs/reference/cli-reference.md)); bare `approve <word>` accepts the defaults stated in `decision.summary`:

```bash
agc approve apr_51e --word kmpd --budget 50 --autonomy watch
```

## Errors

Every code, its exit and fix: [Error code catalog](/docs/reference/error-code-catalog.md).

| Code | Exit | Cause | Fix |
|---|---|---|---|
| `limits.approval_required` | 10 | A Builder agent or key asked to change the limits. | Relay `data.approval.url`; the person decides in the console. |
| `limits.bad_request` | 2 | Neither flag, a budget outside 5 to 1000 or not whole, or an autonomy other than `routine` or `watch`. | Pass `--budget` (5 to 1000), `--autonomy` (`routine` or `watch`), or both. |
| `limits.unclaimed` | 1 | Nobody has claimed the app yet. | Its claim or first approval sets them. |
| `agent.purpose` | 12 | A Mirror-only or Read-only agent, or a key or token of another purpose, ran `agc limits set`. | The person changes them in **Releases and cost**. |
| Console page "A newer release replaced this one" | | A newer ship of the app replaced the release (HTTP 410). | Decide the newer release's approval. |
| Console page "This approval expired" | | Nobody decided within 24 hours; the release ended (HTTP 410). | Ship again for a new approval. |

## Limits

An approval lasts 24 hours. The budget takes 5 to 1000 whole dollars. **Instances**, on the same settings card, takes 1 to 4.

## Agent notes

- Don't call a release live until `agc wait` reports `"outcome": "live"`. Under `watch`, every ship exits 10, as expected.
- Don't put the policy or budget in `agentcloud.toml`; nothing reads them there. An agent can't let a held check go, and can't approve its own `agc limits set`.
- Don't round a person's budget into range: ask again.
- Run `agc limits set` only with values your person gave you.

## Related

- [Approvals](/docs/concepts/approvals.md)
- [What agents can and can't do](/docs/concepts/what-agents-can-and-cant-do.md)
- [Approving in a session vs the console](/docs/ship/approving-in-a-session-vs-the-console.md)
- [Held checks and --fixes](/docs/checks/invariants.md#held-checks-and-fixes)
- [Members, roles, invites, join requests](/docs/owners/members-roles-invites-join-requests.md)

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