From f7fd3f43fe21c70d1623716b080078e1b575319b Mon Sep 17 00:00:00 2001 From: Michael Nguyen <13559011+nguyenm7@users.noreply.github.com> Date: Tue, 24 Nov 2026 14:45:34 -0800 Subject: [PATCH] docs: correct three budget claims from the review of the budget docs (#22833) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Operators control what agents spend with budgets, and the public docs explain how budgets work > - Pull request #22784 updated the budget docs to match the code on `master` > - The review of #22784 found three claims that were stated too broadly > - #22784 merged before the corrections reached its branch, so `master` still has the three claims > - An operator who reads them can expect the wrong behavior from a budget > - This pull request applies the three corrections. It changes docs only > - The benefit is that the budget docs on `master` match the review and the code ## Linked Issues or Issue Description Refs #22784 Refs #8856 **Issue type** Incorrect content. **Where is the issue?** - `docs/guides/board-operator/costs-and-budgets.md` - `docs/api/costs.md` - `docs/guides/board-operator/creating-a-company.md` - `docs/guides/board-operator/managing-agents.md` - `docs/start/core-concepts.md` - `docs/guides/agent-developer/cost-reporting.md` **What's wrong?** Three claims from #22784 are too broad: 1. The docs say that a budget does not stop an agent that runs on a subscription. Subscription usage adds no billed spend, but a hard stop in the agent's scope still refuses its runs, and the reserve per run applies to every run. 2. One guide says that both thresholds are settings. Only the warning percentage is a setting. The hard stop is on or off and always uses 100% of the budget. 3. The docs say that the unpriced-usage setting blocks all usage with no price. It does not cover every entry under "run costs unavailable". **Suggested fix** Apply the corrections from the review threads of #22784. ## What Changed - Subscription claim: the docs now say that subscription usage adds $0 and never moves a budget toward its limit. They also say that a hard stop on a shared budget and the reserve per run still apply to subscription agents. Corrected in the main guide, the API page, and four related guides. - Thresholds: `creating-a-company.md` now says that you can change the warning percentage and turn the hard stop on or off, and that the hard stop always uses 100% of the budget. - Unpriced usage: the guide now says that the setting covers usage from a complete receipt that has no price. It lists the entries that do not trigger `block`. ## Verification I read the code on `origin/master`. I did not run the product. - A hard stop refuses work in its scope without reading the billing type: `server/src/services/budgets.ts:825` - The reserve check does not read the billing type: `server/src/services/budget-reservations.ts:160` - The hard stop compares spend with the full amount: `server/src/services/budgets.ts:258` - The exclusions from the unpriced-usage block: `server/src/services/budget-exposure.ts:144` - I checked every internal link and anchor in the changed files with a script. All resolve. - `git diff --check` reports no whitespace errors. ## Risks Low risk. The change is docs only. It is the same commit that the review threads of #22784 refer to, applied on top of `master`. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Claude Fable 5.2 (Anthropic), model ID `claude-fable-5-2`, in Claude Code. Extended thinking and tool use (file read, search, shell, `gh`). The model read the code, wrote the docs, and wrote this description. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [ ] I have run tests locally and they pass — *docs only. No test reads these files* - [ ] I have added or updated tests where applicable — *not applicable. Docs only* - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green — *pending on this PR* - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups — *pending on this PR* - [x] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.2 --- docs/api/costs.md | 4 +- docs/guides/agent-developer/cost-reporting.md | 2 +- .../board-operator/costs-and-budgets.md | 38 ++++++++++++++----- .../board-operator/creating-a-company.md | 4 +- docs/guides/board-operator/managing-agents.md | 4 +- docs/start/core-concepts.md | 2 +- 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/docs/api/costs.md b/docs/api/costs.md index 1d99df02913..00efd4bbc38 100644 --- a/docs/api/costs.md +++ b/docs/api/costs.md @@ -75,7 +75,7 @@ Both are board-only. Both are separate from budgets. A budget is a budget policy on one scope: `company`, `agent`, or `project`. Only board users can change budgets. -Budgets count billed cost in cents (`billed_cents`). Usage with the billing type `subscription_included` has a cost of 0 cents, so a budget does not stop an agent that runs on a subscription. +Budgets count billed cost in cents (`billed_cents`). Usage with the billing type `subscription_included` has a cost of 0 cents, so it never moves a budget toward its limit. A hard stop and `reservationCents` still apply to runs on a subscription. ### Budget Overview @@ -125,7 +125,7 @@ POST /api/companies/{companyId}/budgets/policies | `notifyEnabled` | `true` | Whether the warning opens | | `hardStopEnabled` | `true` | Whether work stops when spend reaches the limit | | `reservationCents` | `0` | An estimate held against the budget before each run starts | -| `unpricedUsagePolicy` | `block` | `block` or `allow`. What to do when usage has no reliable price | +| `unpricedUsagePolicy` | `block` | `block` or `allow`. What to do when a complete usage receipt has no reliable price | | `isActive` | `true` | Set `false` to turn the policy off and keep its amount | A scope has one policy for each window kind. A second call with the same scope and window updates the policy. Fields you leave out keep their value. diff --git a/docs/guides/agent-developer/cost-reporting.md b/docs/guides/agent-developer/cost-reporting.md index be58fe8b2d5..7cf06c71328 100644 --- a/docs/guides/agent-developer/cost-reporting.md +++ b/docs/guides/agent-developer/cost-reporting.md @@ -86,7 +86,7 @@ POST /api/companies/{companyId}/cost-events Each cost event has a billing type. When an adapter runs on a provider subscription instead of an API key, it reports the billing type `subscription_included`. Paperclip keeps the token counts and records the cost as 0 cents. -Budgets count billed cents only. Subscription usage therefore never moves an agent toward its budget, and a budget does not stop an agent that runs on a subscription. +Budgets count billed cents only. Subscription usage therefore never moves an agent toward its budget. A hard stop on a company or project budget, and the reserve per run, still apply to an agent that runs on a subscription. ## Budget Awareness diff --git a/docs/guides/board-operator/costs-and-budgets.md b/docs/guides/board-operator/costs-and-budgets.md index 1b74c642452..4e7b7ef9faa 100644 --- a/docs/guides/board-operator/costs-and-budgets.md +++ b/docs/guides/board-operator/costs-and-budgets.md @@ -6,7 +6,7 @@ summary: Cost tracking, budget limits, hard stops, and budget incidents Paperclip records the usage and cost of every agent run. You can set a budget for the company, for one agent, or for one project. When the recorded spend reaches a budget, Paperclip stops work in that scope until you act. -A budget counts dollars only. Usage on a Claude, ChatGPT, or other provider subscription is recorded at $0, so **a budget does not stop an agent that runs on a subscription**. See [What a Budget Counts](#what-a-budget-counts). +A budget counts dollars only. Usage on a Claude, ChatGPT, or other provider subscription is recorded at $0, so **subscription usage never moves a budget toward its limit**. A budget does not limit how much of a subscription an agent uses. A hard stop and the reserve per run still apply to subscription agents. See [What a Budget Counts](#what-a-budget-counts). ## What a Budget Counts @@ -18,7 +18,7 @@ Every cost event has a billing type. The billing type decides whether the event | Billing type | Recorded cost | Counts toward a budget | |--------------|---------------|------------------------| | `metered_api` | The cost the provider or Paperclip's price list reports | Yes | -| `subscription_included` | Always $0. Tokens are still recorded | No | +| `subscription_included` | Always $0. Tokens are still recorded | No. It adds $0 | | `subscription_overage`, `credits`, `fixed` | The reported cost, if there is one | Yes, for the reported cost | | `unknown` | The reported cost, if there is one | Yes, for the reported cost | @@ -26,9 +26,17 @@ An agent runs on a subscription when its adapter signs in with a subscription ac For these agents: -- The spend stays at $0, so the warning and the hard stop never trigger. -- The budget card shows $0 observed, even when the agent uses many tokens. -- To stop the agent, pause it. See [Managing Agents](/guides/board-operator/managing-agents). +- Their usage adds $0 to the spend. Subscription usage alone never triggers the warning or the hard stop. +- The budget card shows $0 observed for their runs, even when they use many tokens. + +A budget can still stop an agent that runs on a subscription: + +- A hard stop stops all work in its scope. If API-billed work reaches the company budget or a project budget, the subscription agents in that company or project stop too. +- The reserve per run is held for every run, whatever its billing type. If the reserve does not fit under the limit, the run is refused. See [Reserve per Run](#reserve-per-run). + +To limit how much of a subscription an agent uses: + +- Pause the agent. See [Managing Agents](/guides/board-operator/managing-agents). - To see how much of the subscription is used, open the **Providers** tab. See [Subscriptions and Provider Quota](#subscriptions-and-provider-quota). ## How Cost Tracking Works @@ -181,23 +189,33 @@ If the recorded spend plus the amounts held for unfinished runs would go above t - The default is `0`, which turns the estimate off. - When more than one budget applies to a run, Paperclip uses the largest reserve. - The reserve is an estimate. The real cost of a run can be higher. +- The reserve applies to every run, including a run on a subscription that records $0. Set it under **Advanced settings** on the budget card, or with `reservationCents` in the API. ## Usage With No Reliable Price -Sometimes Paperclip records usage but cannot give it a price. `unpricedUsagePolicy` controls what a budget with a hard stop does in that case: +Sometimes Paperclip has a complete usage receipt for a run but cannot give it a price. `unpricedUsagePolicy` controls what a budget with a hard stop does with that usage: - `block` (default) — a hard stop opens, even when the known spend is under the limit. To resume, resolve the unpriced usage or change the setting to `allow`. You cannot raise the budget past this stop. - `allow` — the budget ignores the unpriced usage and counts known spend only. -Subscription usage is not unpriced usage. It has a price of $0 and never triggers this setting. +The budget card shows the usage that counts for this setting as **usage events are unpriced**. Hosted browser work with a cost that is not known yet also counts. -In the UI, this is the **Block new work when usage has no reliable price** checkbox under **Advanced settings**. To see which runs have no price, expand **run costs unavailable** on the Costs overview. See [Cost Reporting](/guides/agent-developer/cost-reporting). +This setting does not cover every entry that the Costs overview lists under **run costs unavailable**. These entries do not trigger `block`: + +- A run whose final usage receipt is missing or could not be captured +- An entry that has a known partial cost +- A metered API or subscription entry with no tokens +- Subscription usage. It has a price of $0 + +Work continues for those entries. For what each label on the Costs overview means, see [Cost Reporting](/guides/agent-developer/cost-reporting). + +In the UI, this setting is the **Block new work when usage has no reliable price** checkbox under **Advanced settings**. ## Subscriptions and Provider Quota -Budgets do not cover subscriptions. Paperclip shows subscription information in two other places. +Budgets do not measure subscription usage. Paperclip shows subscription information in two other places. ### Subscriptions @@ -234,7 +252,7 @@ See the [Costs API](/api/costs) for the full list. ## Best Practices -- Check how each agent is billed before you rely on a budget. A budget protects API-key usage. It does not limit a subscription +- Check how each agent is billed before you rely on a budget. A budget measures API-billed spend. Subscription usage adds $0 to it - Set conservative budgets initially and increase as you see results - Use per-agent budgets to limit exposure from any single agent - Use a project budget to cap the total cost of one piece of work diff --git a/docs/guides/board-operator/creating-a-company.md b/docs/guides/board-operator/creating-a-company.md index 5ebf0298f4c..1b94b45e5fc 100644 --- a/docs/guides/board-operator/creating-a-company.md +++ b/docs/guides/board-operator/creating-a-company.md @@ -50,9 +50,9 @@ Set monthly budgets at the company and per-agent level. You can also set a budge - **Warning** at 80% of the budget. Work continues - **Hard stop** at 100% — the company, agent, or project is paused, new work is refused, and a budget incident opens -Both thresholds are settings on the budget. +You can change the warning percentage and turn the hard stop on or off. The hard stop always uses 100% of the budget. -Budgets count dollars only. Usage on a provider subscription is recorded at $0, so a budget does not stop an agent that runs on a subscription. See [Costs and Budgets](/guides/board-operator/costs-and-budgets). +Budgets count dollars only. Usage on a provider subscription is recorded at $0, so subscription usage never moves a budget toward its limit. A hard stop still stops every agent in its scope. See [Costs and Budgets](/guides/board-operator/costs-and-budgets). ## Step 6: Launch diff --git a/docs/guides/board-operator/managing-agents.md b/docs/guides/board-operator/managing-agents.md index 59ebb440e2b..16bda7b8dcb 100644 --- a/docs/guides/board-operator/managing-agents.md +++ b/docs/guides/board-operator/managing-agents.md @@ -70,7 +70,7 @@ Edit an agent's configuration from the agent detail page: - **Adapter config** — change model, prompt template, working directory, environment variables - **Heartbeat settings** — interval, cooldown, max concurrent runs, wake triggers -- **Budget** — monthly spend limit. It counts billed cost, so it does not limit an agent that runs on a subscription +- **Budget** — monthly spend limit. It counts billed cost. Usage on a provider subscription adds $0 to it Use the "Test Environment" button to validate that the agent's adapter config is correct before running. @@ -90,7 +90,7 @@ POST /api/agents/{agentId}/resume An agent is also paused when its recorded spend reaches its monthly budget, unless the hard stop is turned off for that budget. A budget pause opens a budget incident. Resolve it from the incident: raise the budget, or keep the agent paused. A budget pause on a monthly budget also ends when the next UTC month starts. -Budgets count dollars only. Usage on a provider subscription is recorded at $0, so a budget does not pause an agent that runs on a subscription. See [Costs and Budgets](/guides/board-operator/costs-and-budgets). +Budgets count dollars only. Usage on a provider subscription is recorded at $0, so an agent's subscription usage never reaches its budget. A hard stop on the company budget or on a project budget still stops the agent. See [Costs and Budgets](/guides/board-operator/costs-and-budgets). ## Terminating Agents diff --git a/docs/start/core-concepts.md b/docs/start/core-concepts.md index 27cfecb1af2..998dc77c431 100644 --- a/docs/start/core-concepts.md +++ b/docs/start/core-concepts.md @@ -24,7 +24,7 @@ Every employee is an AI agent. Each agent has: - **Adapter type + config** — how the agent runs (Claude Code, Codex, shell process, HTTP webhook) - **Role and reporting** — title, who they report to, who reports to them - **Capabilities** — a short description of what the agent does -- **Budget** — per-agent monthly spend limit. It counts billed cost, so it does not limit usage on a provider subscription +- **Budget** — per-agent monthly spend limit. It counts billed cost. Usage on a provider subscription adds $0 to it - **Status** — active, idle, running, error, paused, or terminated Agents are organized in a strict tree hierarchy. Every agent reports to exactly one manager (except the CEO). This chain of command is used for escalation and delegation.