Give the Agent a Budget, Not a Token: Anthropic's CI Team on Safe Agent Permissions

AI Engineer 2026: Anthropic Talks
21 parts- 1Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
- 2Inside the Claude Managed Agents Workshop: Pets, Cattle, Outcomes and Dreaming
- 3How Anthropic Builds: Mike Krieger on Being Unreasonable With Claude
- 4How Jarred Sumner Ships Millions of Lines of Agent-Written Code
- 5A Field Guide to Fable: Thariq Shihipar on Unhobbling Claude and Finding Your Unknowns
- 6Claude Tag Lands 65% of Anthropic's Product PRs: Takeaways From Cat Wu and Thariq Shihipar
- 71,000 Claude Agents, Git and a Database: How Fable 5.2 Formalized Fermat Without a Custom Harness
- 8Your Old Prompts Are Making Claude Worse: Lance Martin's Checklist for Frontier Models
- 9Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
- 10Tokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
- 11Give the Agent a Budget, Not a Token: Anthropic's CI Team on Safe Agent PermissionsCurrent
- 12Rethinking Claude Code Best Practices: Lydia Hallie on Getting Out of the Loop Safely
- 13How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
- 14Using LLMs to Secure Source Code: Eugene Yan's Six-Step Pipeline From Anthropic
- 15From Messages API to Managed Agents: Anthropic's Applied AI Team on Harnesses That Go Stale
- 16Forward Deployed Engineering 101: When Your AI Startup Needs FDEs, From Palantir to Anthropic
- 17The Enterprise Tech Stack for AI Agents: Why Your POC Stalls and How to Design Past It
- 18The Claude Certified Architect Exam as a Field Guide to Agentic Engineering
- 19The Future of MCP: David Soria Parra on Connectivity, Progressive Discovery and Skills Over MCP
- 20Gateways Are All You Need: How Anthropic Thinks About MCP in the Enterprise
- 21How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator Harness
TL;DR
After an agent deleted 200 workloads in 90 seconds, Anthropic's CI team replaced scoped tokens with budgets: asymmetric verbs, refilling rate limits, tripwires and the undo test.
Sachin Malhotra is an engineer on Anthropic's CI team, which runs the test machinery for the whole company: test quarantining, merge automation, merge queues and CI autoscaling. Their AI Engineer World's Fair 2026 talk starts with an incident and ends with a set of primitives that any platform team putting agents into production should steal.
Source: Give the Agent a Budget, Not a Token, Sachin Malhotra, Anthropic, AI Engineer World's Fair 2026.
200 Workloads in 90 Seconds#
Most agent demos start the same way: hand an agent a god token and a tool list, and watch it build and deploy a cute coffee website in seconds. Malhotra's talk is about what happens after the demo ships.
The incident: an agent was cleaning up after itself, listing workloads it no longer needed and deleting them. Reasonable. But one stage of the shell pipeline evaluated to nothing, the filter dropped out, and the selector matched everything. About 200 workloads belonging to roughly 20 engineers were deleted in 90 seconds. Some were long-running training jobs, possibly not checkpointed.
Nobody was malicious. The agent thought it was tidying up. And it had not done anything Malhotra could not have done themself, because it was using their token. The failure was not the model. It was unbounded power with nobody watching.
Tokens Are Booleans. Budgets Have Dimensions.#
The standard post-incident fix is to narrow the token: take away delete. Malhotra argues that works for a week or two, until the agent genuinely needs to delete something and you are back to pressing Enter by hand.
You would never onboard a junior engineer that way. You do not remove whole verbs from new hires; you make catastrophic actions structurally out of reach, give them an escalation path, and stop watching every keystroke. Agents differ in that they never sleep and are occasionally very confidently wrong. "If I'm being honest, that's maybe most of us in the first month of our jobs."
A token is a yes or no. A budget has four dimensions:
- How much can the agent do?
- How fast can it do it?
- What can it undo on its own?
- Who is noticing while it acts?
Each primitive below replaces a yes/no with a budget along one of those axes.
Primitive 1: Asymmetric Verbs#
Stop thinking about resources and think about verbs, the operations an agent can perform, and specifically about how each fails.
- Some verbs fail loudly. If an agent un-skips a test and it was the wrong call, CI goes red and a human fixes it cheaply. Paging a human by mistake is a nuisance, not a disaster.
- Some verbs fail silently. If an agent skips a test it should not have, nothing turns red. A real bug can walk into production with green checks.
Skip and un-skip look like the same size of action, but only one of them shows up on a dashboard when it goes wrong. Give agents the loud verbs; keep a human on the quiet ones.
At Anthropic, the test quarantine service holds the tests on-call engineers skipped during incidents. The agent may re-enable them freely. Skipping, a break-glass action, requires a human and always leaves an audit trail. Crucially, the agent does not write its own audit record. A proxy in the middle stamps the caller's identity on every call. The agent never holds the pen on its own provenance.
Primitive 2: Rate Limits That Refill#
Every write gets a ceiling that refills over time. Within the limit the agent has full autonomy: no approvals, no waiting. Cross it and the request bounces with the count; wait, and the budget refills. There are no exceptions to having a limit, only to its size. Deleting your own namespace's workloads might allow more than touching a shared namespace.
After the incident, a neighboring team built an admission webhook that caps deletes at a fixed number per hour, per resource kind, per namespace. There is a bypass flag for genuine on-call needs. The part Malhotra loves: inside a Claude Code or agent session, the bypass flag refuses to work and tells the agent to ask the human to run the command. The agent gets the rate limit, the human keeps the override, and because the limit refills, nobody files tickets.
That one control would have capped the original incident at a few dozen workloads instead of 200.
Primitive 3: Tripwires Over Allow Lists#
An allow list is a guess, written up front, about what the agent will need, before you have any data on how it behaves. A tripwire collects that data after the fact. For cheap actions, let the agent act, record every action with its stamped identity, and watch the aggregate rather than individual calls. When the pattern looks wrong, you learn something, and you fix what you can with a sentence in the agent's instructions.
The Undo Test#
The lens that sizes all three: can this action be undone? If yes, it can sit inside the agent's budget. If no, it needs a second key, one the agent does not hold, plus an audit record of why it was used. You cannot un-delete a running job in someone else's namespace, so anything past the rate cap there needs a human.
Their non-CI example is feature flags. The agent has a key for the canary environment (staging traffic and dogfooding customers) with the full dial: ramp a flag from 0 to 100%, watch incoming bugs, toggle it back. It has no key for production. The most it can do there is propose a promotion. The "second key" is not a new auth system, just separately scoped keys per environment. Day to day, Malhotra asks Claude Tag in Slack to own a rollout loop end to end, and every action is stamped with the agent's identity, not their.
Text Explains, Infrastructure Enforces#
Where does this policy live? In two places, and you need both.
| Layer | What it is | Strength | Weakness |
|---|---|---|---|
| Text | Prompts and context files the agent reads | Cheap to change, explains why | About 80% reliable in their experience, needs gardening, is only advice |
| Infrastructure | A proxy next to every agent session | Deterministic: count, compare, allow or return 403 | Cannot explain intent |
A clever prompt injection cannot talk a proxy out of a rule. Text shapes what the agent tries; infrastructure bounds how wrong it can go.
%% title: Identity is stamped by infrastructure, not the agent
flowchart TD
A[Agent session] --> P[Per-session proxy: holds real credentials]:::emphasis
P --> K[Cluster, CI, flag service]
K --> L[Identity label inherited by child jobs]
L --> Q[Quotas, rate limits, tripwires, approvals]Why Identity Must Come From the Proxy#
The final point is the one Malhotra says everything else depends on. If the agent can set its own identity, say in a header, then the moment it hits a limit the easiest fix is to change the header and get a fresh budget. Your rate limit becomes a suggestion.
With a proxy holding the real credentials, the agent never says who it is. The proxy already knows, stamps every call, and adds a per-session ID so you can tell which of many sessions is misbehaving. Downstream, the cluster writes that stamp onto jobs as a label, child jobs inherit it, and ownership, quotas, rate limits, approvals and tripwires all key off that one label the agent never touched.
Our Take#
This is the most practical agent-security talk in the series, and it is notable for what it does not rely on: the model behaving well. Every control assumes the agent will sometimes be confidently wrong and makes the damage bounded and visible.
The four takeaways, in Malhotra's order:
- Give agents verbs that fail loudly; keep humans on verbs that fail quietly.
- Put a refilling ceiling on every write, so nobody needs to file tickets.
- Watch the aggregate, not individual calls, and fix what you can with a sentence.
- Use the undo test to size everything else.
And underneath all of it: identity comes from infrastructure, not from the request. For the developer-machine side of the same problem, see Lydia Hallie's rethinking Claude Code best practices, and our agent security checklist.
FAQ#
What does "give the agent a budget, not a token" mean?#
Instead of a static yes/no token scope, bound an agent's power along several dimensions: how much and how fast it can act, what it can undo on its own, and who is watching, enforced by rate limits and an identity-stamping proxy.
What is an asymmetric verb?#
An action whose failure is visible in one direction but silent in the other. Un-skipping a test fails loudly in CI; skipping one can hide a bug behind green checks, so it needs a human.
Why should a proxy stamp agent identity?#
If the agent can declare its own identity, it can reset its rate limits by claiming a new one. A proxy holding the real credentials stamps every call, so limits and audit trails cannot be bypassed.
Sources#
The Full Series#
This post is part of our coverage of Anthropic's talks at AI Engineer 2026:
- Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
- Inside the Claude Managed Agents Workshop: Pets, Cattle, Outcomes and Dreaming
- How Anthropic Builds: Mike Krieger on Being Unreasonable With Claude
- How Jarred Sumner Ships Millions of Lines of Agent-Written Code
- A Field Guide to Fable: Thariq Shihipar on Unhobbling Claude and Finding Your Unknowns
- Claude Tag Lands 65% of Anthropic's Product PRs: Takeaways From Cat Wu and Thariq Shihipar
- 1,000 Claude Agents, Git and a Database: How Fable 5.2 Formalized Fermat Without a Custom Harness
- Your Old Prompts Are Making Claude Worse: Lance Martin's Checklist for Frontier Models
- Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
- Tokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
- Rethinking Claude Code Best Practices: Lydia Hallie on Getting Out of the Loop Safely
- How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
- Using LLMs to Secure Source Code: Eugene Yan's Six-Step Pipeline From Anthropic
- From Messages API to Managed Agents: Anthropic's Applied AI Team on Harnesses That Go Stale
- Forward Deployed Engineering 101: When Your AI Startup Needs FDEs, From Palantir to Anthropic
- The Enterprise Tech Stack for AI Agents: Why Your POC Stalls and How to Design Past It
- The Claude Certified Architect Exam as a Field Guide to Agentic Engineering
- The Future of MCP: David Soria Parra on Connectivity, Progressive Discovery and Skills Over MCP
- Gateways Are All You Need: How Anthropic Thinks About MCP in the Enterprise
- How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator Harness
Continue Reading#
Get the next deep dive like this in your inbox
One email a week on Anthropic and the rest of the AI dev stack. Free.
Read next on Claude Code
The Agent Security Checklist I Use Before Connecting Tools
Before an AI agent gets tools, files, APIs, MCP servers, or deployment access, decide what it can read, write, call, log, and roll back.
8 min readAgent Identity Is the Missing Security Layer for AI Workflows
Agent identity for AI workflows: what the Linux Foundation's Agent Name Service proposal means for verifiable identity, scoped capabilities and audit trails.
7 min readTokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
Katelyn Lesse and Angela Jiang of Anthropic show that at a fixed token budget, giving tokens jobs (advise, grade, dream) beats pure execution, and cuts the true cost of a correct answer.
7 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








