In short.
Anthropic's Task budgets page is a guide for developers building Claude applications that use tools over multiple steps; it explains a beta API setting that gives Claude an advisory token allowance. The allowance covers a whole agentic loop, and the main catch is that it is a soft hint, not a hard cap. You set output_config.task_budget with type "tokens" and a total of at least 20,000, and send the beta header task-budgets-2026-03-13. The server then injects a running countdown that only the model sees, and the model uses it to prioritise work and wrap up gracefully. The page says the budget counts thinking, tool calls, tool results and output, and that content you resend in later requests is not counted again. It also says a budget that is too small can cause refusal-like behaviour, and that task budgets are not supported on Claude Code, Cowork or Managed Agents. This report is based only on reading the documentation. Nothing was run or tested, and the page states no pricing.
Researched and written by an AI model and checked by a second AI model. How it works
The scope is the single documentation page at [https://platform.claude.com/docs/en/build-with-claude/task-budgets.md], captured in full (34,186 bytes) on 2026-11-15. Pages it links to were not read and are excluded. These include the pages on effort, adaptive thinking, compaction, prompt caching and Managed Agents session budgets, the model overviews and the beta headers overview. No licence or notice file was captured with the page. Nothing was run: the code samples, the API behaviour, the model support table and the counting rules are the page's own statements and were not tested or verified.
The overview
What this resource is
The resource is a single documentation page titled Task budgets on Anthropic's Claude Platform docs at [https://platform.claude.com/docs/en/build-with-claude/task-budgets]. It was captured in its .md form at [https://platform.claude.com/docs/en/build-with-claude/task-budgets.md]. The page describes itself this way: give Claude an advisory token budget for the full agentic loop to help the model self-regulate on long agentic tasks. Its metadata marks the feature as beta, with the beta header task-budgets-2026-03-13.
It is a guide to one API feature, not software you install. The page contains reference text, request examples in several languages (cURL, the ant CLI, Python, TypeScript, C#, Go, Java, PHP and Ruby), a worked token-counting example and a support table. The captured page shows no author name or revision date.
Overall assessment
For its audience the page looks specific and practical. It gives the field names, the minimum value, the header, the models and platforms, and several pitfalls that are easy to miss. These include the budget being advisory, the risk of under-reporting if you decrement remaining while resending full history, the effect on prompt caching, and refusal-like behaviour when the budget is too small. It also includes a walkthrough with numbers that separates request payload size from budget spend.
The main weaknesses are that the feature is in beta and limited to named models. The page states no pricing and gives no benchmarks or measured effects, so it does not establish how much a budget changes real cost, quality or latency. Because nothing was run, every statement here about behaviour is the documentation's claim, not a verified result.
Who it is for
The page is for developers who call the Claude Messages API directly and run agentic loops. An agentic loop is a series of requests in which the model calls tools, receives results and decides what to do next. The page names three use cases. The first is letting Claude self-regulate token spend on long-horizon tasks. The second is having a predictable per-task cost or latency ceiling. However, task_budget is advisory and max_tokens limits generated tokens only per request, so neither gives a hard cost or latency cap across the whole loop. The third is having the model finish gracefully, by summarising findings or reporting progress, instead of being cut off mid-action.
It is less useful to people who only use chat apps, and the page says task budgets do not work on Claude Code or Cowork. Teams using Managed Agents are pointed to Session budgets instead. A beginner can follow the idea, but the page assumes familiarity with API requests, tool use, stop reasons and token usage fields.
What it lets you do
According to the page, a task budget tells Claude how many tokens it has for a whole agentic loop, including thinking, tool calls, tool results and output. The model receives a running countdown and uses it to prioritise work and finish gracefully as the budget is used up. Because thinking tokens are included in the count, the page says adaptive thinking scales down as the budget runs low.
You can set a new task_budget on a later request to extend or change the budget mid-conversation. The optional remaining field lets you carry over what is left after your own code compacts or rewrites the history. The page describes task budgets as complementary to the effort parameter: effort tunes how deeply Claude reasons about each step, while the budget tunes how much total work happens across the loop.
The page offers no way to read the remaining budget back from the API. It says the countdown is visible only to the model, and that the response usage object contains no task_budget information.
Using it
Requirements
You need access to the Claude API or one of the other platforms the page lists as beta: Claude Platform on AWS, Claude Models on Google Cloud (Google managed), and Microsoft Foundry. The direct Claude API cURL example uses x-api-key, anthropic-beta: task-budgets-2026-03-13 and anthropic-version: 2026-10-21. Authentication and platform-specific setup for the other listed platforms are not described.
The model must be on the supported list. The page names Claude Fable 5.2, Mythos 5.2, Fable 5.1, Mythos 5.1, Fable 5, Mythos 5, Mythos Preview, Opus 5.5, Opus 5, Sonnet 5.5, Haiku 5.5, Opus 4.8 and Opus 4.7. It lists Sonnet 5, Opus 4.6, Sonnet 4.6 and Haiku 4.5 as not supported. The total must be at least 20,000 tokens on every supported model, and smaller values return a 400 error.
At xhigh or max effort, the page advises setting max_tokens to at least 64k so Claude has room to think and act on each request. The page does not say whether a particular SDK version is needed for the typed task_budget fields.
How it works
You add task_budget to output_config with three fields: type (always "tokens"), total, and an optional remaining that defaults to total. The server injects a budget-countdown marker into the conversation. The marker shows how many tokens remain and updates as the model generates thinking, tool calls and output, and as it processes tool results.
A budget covers one agentic turn: everything Claude does in response to one user message that carries no tool results. A user message with tool_result blocks continues the current turn, even if it also adds text. A new user message with no tool results starts a new turn with a fresh budget. The page notes that today the countdown still counts earlier turns' history while that history remains in context.
The budget counts what Claude sees, not what your payload contains. Resent history is not counted again, but new tool results and newly generated tokens are. The worked example uses a total of 100,000 across three requests, with 5,000, 6,800 and 7,200 tokens counted. That is 19,000 spent, leaving about 81,000, while the client sent roughly 20,820 tokens of payload.
Server-side compaction during a turn does not reset the budget. If your own code compacts or rewrites history, you pass remaining yourself so the countdown continues instead of resetting. The page says to pass that figure on every request after you replace history, to update it only when you replace the history, and to leave out tokens that are still in the messages you send.
Setup steps
The page's setup is short. Choose a supported model and add the beta header. In the SDKs this is done with the betas parameter and the client.beta.messages namespace. Then add output_config with a task_budget object of type tokens and a total of at least 20,000. The page's examples pair this with effort set to high and a large max_tokens (128000), and they use streaming. Setup for the other listed platforms is not described.
To choose a value, the page suggests running a representative sample of tasks without task_budget. For each task, sum usage.output_tokens across every request in the loop, add the tool-result tokens you append, and record the distribution. Then start from the p99 of per-task spend and test up or down. To preserve prompt caching, the page advises setting the budget once on the initial request and letting the model self-regulate, instead of decrementing it client-side.
The code snippets on the page are fragments, and some omit imports or client setup. They were not run for this review.
Worked example from the page
The page's example is a security audit loop with a single bash tool and a total of 100,000 tokens. Request 1 sends the user message "Audit this repo for security issues and report findings." Claude thinks and emits a bash tool call (cat package.json and npm audit --json), about 5,000 generated tokens, leaving roughly 95,000.
In request 2 the client resends the history plus a 2,800-token npm audit result. Claude spends 4,000 more tokens on thinking and a grep for eval( in src. About 6,800 tokens count, leaving about 88,200. In request 3 a 1,200-token grep result is added, and Claude writes a 6,000-token final report with stop_reason end_turn, leaving about 81,000.
The point is that the original user message was sent three times and the first assistant message twice, but each was counted only once. These figures are illustrative numbers from the documentation, not measurements.
Assessment & evidence
Limitations and risks
The page lists several limits itself. The budget is a soft hint, not a hard cap, and Claude may exceed it if stopping would be more disruptive than finishing the current action. The enforced limit is max_tokens, which applies per request, while the budget spans the loop. The two settings are independent, and neither has to be at or below the other.
A budget that is clearly too small can cause refusal-like behaviour. The page's example is a 20,000-token budget for a multihour coding task, which may lead Claude to decline, cut the scope aggressively, or stop early with a partial result. The page says to raise the budget before debugging other parameters.
Tracking the budget client-side is awkward. The countdown is not exposed, so your own count may differ from the model's. If you decrement remaining while also resending full history, the model sees an under-reported budget and may finish earlier than needed. The page recommends a generous budget and letting the model self-regulate.
Availability is narrow. The feature is in beta, limited to listed models, and unsupported on Claude Code, Cowork and Managed Agents. The page says that today earlier turns' history still counts toward the countdown while it stays in context, which suggests this behaviour may change. The page does not describe or measure how the budget affects the quality or accuracy of results.
Reasoning behind the assessment
The assessment rests on what the page says. It gives exact field names, a header, a minimum value, a support table and a step-by-step token-counting example, so a developer can act on it. The page is also open about its caveats, with warnings about advisory behaviour, under-reporting and refusal-like behaviour.
Confidence is limited because nothing was run and there is no independent evidence. No claim about model behaviour was checked, and the evidence includes no third-party results. The page does not quantify how a budget affects quality, cost or latency, so any stated benefits are the vendor's own description.
Alternatives and related controls
The page points to related controls. The effort parameter tunes how deeply Claude reasons at each step. max_tokens is the hard per-request ceiling. Server-side compaction, or compacting the history in your own code, manages context size in long conversations. Prompt caching reduces cost on repeated prompt prefixes. For Managed Agents, the page says to use Session budgets instead, because task budgets are not available there.
The page also explains how to measure token use: sum usage.output_tokens across a loop and add the tool-result tokens you append. It presents this for sizing a budget and tracking spend client-side. It does not describe stopping a client loop at a threshold. Alternatives from other vendors were not assessed from this evidence.
Evidence base
The only evidence is the captured text of the selected page. This includes its front-matter metadata (beta status, beta header, supported models and platforms), its prose, code samples, the feature-support table and an availability section. Nothing was run, no API calls were made, and no outside sources were consulted.
Statements in this report about counting, the countdown and support come directly from that text. Where the page is silent, notably on pricing, licence terms, effect on quality and revision history, this report marks the point as unknown.
Access & freshness
Costs
The page states no price for task budgets and no per-token rates. Whether an additional feature fee applies is unknown, so the monetary cost is unknown from this evidence. The page does not say whether the countdown marker injected by the server is billed, or how it affects input or output token charges. Check Anthropic's pricing pages for the model you use.
The page does describe behaviour that affects cost. It lists a predictable per-task cost or latency ceiling as a reason to use task budgets. However, task_budget is advisory, and max_tokens only limits generated tokens per request, cutting off a response with stop_reason max_tokens. Neither gives a hard cost or latency cap across the whole loop. The page also notes that changing the budget value, or decrementing remaining on each request, invalidates prompt-cache prefixes that contain it, which can reduce caching efficiency. Effects on actual spend were not measured.
Rights and reuse
No licence, copyright notice or reuse terms appear in the captured page text, so the terms for copying or redistributing the documentation or its code samples are unknown from this evidence. The feature itself is a hosted API capability, so using it falls under whatever terms apply to your Claude API access, which this page does not describe.
The page is vendor documentation and is best treated as a reference to read and link to, not as material cleared for reuse.
Freshness
The page was captured on 2026-11-15. Its publication and last-updated dates are unknown; the dated header and API-version identifiers do not establish them. The feature is labelled beta, so field names, supported models and counting behaviour may change. The page already describes some counting behaviour as how it works today.
Check the live page and the Claude API release notes before relying on specifics such as the model list, the minimum total or the header name.
Suggested actions
If you run Claude agent loops on a supported model, read this page before setting a budget. First, measure your loop's token spend without a budget and use the p99 as a starting point. Then add task_budget with a generous total and set a reasonable max_tokens. Keep in mind that task_budget is advisory and max_tokens only limits generated tokens per request, so neither gives a hard cost or latency cap across the whole loop. Watch for unexpected refusals or early stops after setting a budget. The page says a budget that is too small can cause these, so they may mean the budget is too small, and the page recommends raising the budget before investigating other parameters.
To estimate budget use yourself, sum usage.output_tokens across every request in the loop and add the tokens of the tool results you append between requests. This estimates task-budget consumption, not monetary charges. If your loop resends the full, unchanged history, omit remaining and let the server track the countdown. If your own code compacts or rewrites the history, follow these steps. Set remaining to the total minus the tokens used by the messages you removed. Do not count anything you still send, including any summary you added. Pass that remaining value on every later request, and update it only when you replace the history again, not on every request.
If you use Claude Code, Cowork or Managed Agents, this feature does not apply. For Managed Agents, the page points to Session budgets. Confirm pricing and current model support with Anthropic before depending on the feature.
