[ ABORT TO HUD ]
SEQ. 1
SEQ. 2

Task Budgets & Adaptive Reasoning

🏛️ Models & Architecture10 min150 BASE XP

Task Budgets (Public Beta)

Task Budgets allow developers to set maximum token spend limits for individual tasks or conversations. This is critical for agentic workflows where the model might iterate many times — without a budget, a stuck agent could consume thousands of dollars in tokens.

// Setting a task budget
const response = await anthropic.messages.create({
  model: "claude-opus-4-7",
  max_tokens: 8192,
  task_budget: { max_input_tokens: 100000, max_output_tokens: 50000 },
  messages: [{ role: "user", content: "Analyze this codebase..." }]
});

Effort Controls

Anthropic introduced an effort parameter that lets you control the depth of reasoning:

LevelUse CaseSpeed
lowSimple lookups, classificationFastest
mediumStandard analysisBalanced
highComplex reasoning, code reviewSlower
maxPhD-level analysis, deep researchSlowest
Cost Tip: Output tokens are significantly more expensive than input tokens. Use effort: "low" for routing decisions and effort: "high" only when quality justifies the cost.
SYNAPSE VERIFICATION
QUERY 1 // 2
What is the purpose of task budgets?
To limit API key usage
To set maximum token spend limits per task, preventing runaway costs in agentic workflows
To limit the number of API calls
To prioritize certain requests
Watch: 139x Rust Speedup
Task Budgets & Adaptive Reasoning | Models & Architecture — Claude Academy