# Spend limit

> How the per-connection spend limit caps the credits an agent can reserve with publish_test.

Each connection has a spend limit in credits, set on the consent page. It caps what that connection can reserve; the credits themselves come from the app owner's balance.

- `create_test`, `create_comparison` and `create_retest` spend nothing.
- `publish_test` reserves the mission's whole budget: every seat, plus a bonus pool and its fee if there is one.
- If this connection's reservations plus the new budget would exceed the limit, publishing fails with `SPEND_LIMIT` and nothing is reserved.
- If the owner's balance is too low, it fails with `INSUFFICIENT_CREDITS`.
- `adjust_test` with `add_seats` reserves the added seats the same way, against the limit of the connection that published the test.
- Credits that come back (unfilled seats, unapproved feedback, a closed mission) free the limit again.

`list_apps` shows the limit and what is reserved so far. A limit of 0 lets a connection draft but never publish.

## What a mission reserves

App tests cost per seat by estimated minutes (5 min: 30 credits, 10 min: 50 credits, 15 min: 70 credits). A quick comparison costs 2 credits per response; a verdict needs at least 20 responses (40 credits). Prices are a beta hypothesis and may change.

> **Ask before publishing**
>
> `publish_test` spends credits. Its description tells the agent to confirm with you first; keep the limit low if you want a hard stop.
