
Every lesson in this level has made agents more capable: loops that run on their own, checks that keep them honest, hooks that enforce rules, teams that share the work. This last one is about the other side of that capability. How much should you let an agent do without asking? How do you check what it did? What stops it spending more than you meant to? And how do you know when to pull the plug?
The short answer is the one I would give about any new colleague. Trust is earned in steps, with a track record. And some things never move, however good the track record gets.

Why errors compound
Anthropic's guide to building agents names the core risk plainly: because agents act on their own over many steps, they can compound errors. A chatbot that gets something wrong gives you one wrong answer. An agent that misreads one file early on can make twenty confident changes built on that misreading. The same guide's remedies are the backbone of this lesson: test in sandboxes, add human checkpoints, and set stopping conditions.
None of that means agents are reckless. It means the cost of a mistake scales with how much the agent may do before anyone looks. Permissions, review and budgets are three ways of deciding when someone looks.
Permissions: the trust ladder
In Claude Code, reading files needs no approval. Editing files and running commands do, unless you have allowed them. That is how Manual mode works. New terminal and VS Code sessions start in auto mode instead, so switch to Manual or Plan while you learn:
- Plan mode: the agent reads and proposes. It changes nothing. Start every new kind of job here.
- Manual mode (called default in settings): it asks before each edit and each command. Slow, and excellent for learning what an agent actually does.
- Accept edits: it may edit files in the project without asking but still asks before running commands.
- Auto mode: a separate classifier judges each action and lets the safe ones through without asking.
There are more permissive settings beyond these, including one that skips the questions entirely. They exist for sealed-off environments, and they are not for a computer that holds anything you care about.
Underneath the modes sit rules. You can write allow, ask and deny rules for specific tools and commands. A rule like Bash(git diff *) lets the agent look at what changed without asking each time. A deny rule blocks something outright, and when rules conflict, deny wins. Organizations can also set managed settings that individual users cannot override, and Claude Code can run commands inside a sandbox that limits what they can reach.
Climb the ladder one step at a time, and only for a kind of job the agent has already done well while you watched. An agent that has fixed fifty page layouts under supervision has earned edit access for page layouts. It has not earned it for your billing exports.
The same idea in a consumer app
You will meet permissions outside coding tools too. Grok Bot, covered in its own lesson, shows approval cards with three choices: allow once, always allow or deny. Its documentation spells out details worth knowing for any agent:
- When settings disagree, "ask first" wins.
- An approval card stops an action before it happens. It does not undo work that already finished.
- Running things on your own computer defaults to asking every time.
- The shared cloud computer is not a security boundary between Bots, so do not put one Bot's secrets where another can reach them.
- Test runs of routines do real work. A "test" that sends an email has sent an email.
That last point is easy to forget and applies everywhere. There is no rehearsal mode for the outside world.
Review: ask for evidence, then look yourself
The lesson on loops covered checks and fresh reviewers. For trust, one habit matters most: review the result, not the report. An agent's summary of what it did is a claim. The changed files, the screenshot, the test output and the sent message are the evidence.
In practice that means three things. Read what changed, not only the agent's description of it; every coding agent can show you the exact lines it altered. Ask for the proof that matches the goal, such as a screenshot at phone width for a layout fix. And for anything that matters, have a fresh agent or a person look before it leaves your computer.
Budgets: limits written in advance
An agent with no spending limit is an open tab. Set limits before you need them:
- Per run. Claude Code's headless mode takes
--max-budget-usdand--max-turns, so an unattended job stops at a dollar figure or a number of rounds. - Per month. API accounts let you set your own spend limit below your tier's ceiling, and a separate one for each workspace. When a limit is reached, requests stop until you raise it. That is the point.
- Per schedule. A loop that runs every five minutes runs about 8,640 times in a 30-day month. Price one run, multiply, and decide whether the answer is worth it.
If an agent setup suddenly burns through money or a plan's allowance, treat that as a signal that something is looping, not just as a bill.
One job, start to finish
Here is how those three ideas fit together on an ordinary job of mine: tidying the layout of a page on one of my sites.
- Before it starts. The agent works in plan mode first and tells me which files it means to change. I read the plan and say yes, or narrow it. Only then does it get permission to edit, and only in that project.
- While it works. It edits files and runs the page on a local copy of the site. Deny rules keep it away from anything that sends mail or touches the live server, and hooks block the few commands I never want run.
- When it reports. It does not just say "done." It shows a screenshot at phone width and the list of lines it changed. A second agent that has not seen the first one's reasoning looks at the result and tries to find what is wrong with it.
- Before it goes anywhere. I look at the page myself on my own computer. If I am happy, I say yes, and only then does it go live.
Most of the time this takes a few minutes of my attention. The agent does the typing. I keep the decisions.
When to stop an agent
Anthropic's advice for working with Claude Code is the best short rule I know: watch the first minute, press Esc as soon as the agent drifts, and if two corrections have not fixed it, clear the conversation and start again with a better prompt. Beyond that, these are the signs I stop on:
- It repeats itself. The same fix tried three times, with small variations.
- It wanders out of scope. Edits to files that have nothing to do with the job.
- It asks for wider permissions to get past an obstacle, rather than explaining the obstacle.
- It claims without showing. "Fixed" with no test, screenshot or output.
- It reaches outside the computer: a database, a payment service, an email or a live site, when the job did not call for it.
- Costs climb faster than the work moves.
Stopping is not failure. It is usually the moment you learn what your instructions were missing. Press Esc, read what happened, rewind to a checkpoint if you need to, and start again with a better brief.
The floor that never moves
However far up the ladder an agent climbs, some actions stay with a person. Mine are written into my instructions and, where it matters, enforced by hooks:
- Nothing goes live without my yes. Work is tested on a local copy first; the agent reports and asks, and does not try the deploy to see if it gets through.
- Data flows down, never up. A copy of live data may come to my computer for testing. Nothing on my computer is ever pushed over live data unless I say so in plain words.
- My development computer cannot email a real person. All mail from it is rerouted to a test inbox, by code, not by a setting someone could flip.
- Back up before anything destructive. Before a database change that deletes or rewrites, a backup, and the agent tells me where it is.
- No new spending without asking. No new paid service or API key goes into a project unless I have priced it and agreed.
Checkpoints cannot help with any of these. A rewind restores files on your computer; it cannot unsend an email, refund a payment or restore a deleted record. That is exactly why they sit on the floor and not on the ladder.
For a private practice
If you use agents near your practice at all, here is the floor I would start with:
- No agent opens a folder that holds client records, notes or billing exports.
- No agent sends email, texts or messages to clients without you reading each one first.
- No agent touches your EHR, your scheduling system or your payment account.
- Every account an agent uses has a spend limit.
- Anything that will be published under your name gets your own read first.
Everything above that floor is a choice you can loosen as trust builds. The floor itself is about your clients, their trust and your own peace of mind, and it does not need to move.
Try it
Write down your floor before you need it: five actions no agent will ever take for you without your yes. Put it where you will see it, and if you use Claude Code, put it in your CLAUDE.md as well. Then pick the rule you would least like broken and ask, as in the lesson on hooks, whether it should be enforced rather than advised.
That is the end of the Agents level. You now know what an agent does each turn, how to make it check its work, how to enforce the rules that matter, how to share work across a team and how to keep all of it on a short, sensible leash. The tools will keep changing. Those habits will not need to.
Further reading
- Configure permissions, Anthropic. Modes, allow, ask and deny rules, sandboxing and managed settings.
- Approvals, security and privacy, xAI. How Grok Bot asks before it acts.
- Building effective agents, Anthropic. Compounding errors and stopping conditions.
- Best practices for Claude Code, Anthropic. Evidence, fresh review and when to start over.
- AI Fluency: Framework and Foundations, Anthropic Academy. A free course on working with AI responsibly.
Facts in this lesson checked November 24, 2026.
This lesson's video has its own page
Sources
- “Configure permissions.” Anthropic. Reads need no approval; edits and commands do; allow, ask and deny rules such as Bash(git diff *); deny wins; plan, default, accept edits, auto and more permissive modes; sandboxing and managed settings. https://code.claude.com/docs/en/permissions (accessed Nov 24, 2026).
- “Approvals, security and privacy.” xAI. Allow once, always allow, deny; "ask first" wins; approvals stop an action but do not undo finished work; local execution asks every time by default; the shared cloud computer is not a boundary between Bots; test runs do real work. https://docs.x.ai/grok-bot/approvals-security-and-privacy (accessed Nov 24, 2026).
- “Building effective agents.” Anthropic, Dec 19, 2024. Agents can compound errors; sandboxes, human checkpoints and stopping conditions. https://www.anthropic.com/engineering/building-effective-agents (accessed Nov 24, 2026).
- “Best practices for Claude Code.” Anthropic. Watch the first minute, press Esc on drift, and after two failed corrections clear and re-prompt; ask for evidence; use a fresh reviewer. https://code.claude.com/docs/en/best-practices (accessed Nov 24, 2026).
- “How Claude Code works.” Anthropic. Checkpoints restore local files; remote actions cannot be undone by a checkpoint. https://code.claude.com/docs/en/how-claude-code-works (accessed Nov 24, 2026).
- “Run Claude Code programmatically.” Anthropic. --max-budget-usd and --max-turns for unattended runs. https://code.claude.com/docs/en/headless (accessed Nov 24, 2026).
- “Rate limits.” Anthropic. Your own spend limit below the tier ceiling, and separate limits per workspace. https://platform.claude.com/docs/en/api/rate-limits (accessed Nov 24, 2026).
- “Intro to Claude Code, Part 2: Permission Modes.” Maria Panneer Rajan (YouTube), Jul 14, 2026. The video on this lesson. https://www.youtube.com/watch?v=rzKCw6Tp37k (accessed Nov 24, 2026).
Study guide
Key terms
- Permission mode: how much the agent may do without asking (plan, default, accept edits, auto)
- Allow, ask and deny rules: per-tool rules; deny wins
- Sandbox: a fenced space that limits what commands can reach
- Approval card: a prompt asking you to allow once, always allow or deny an action
- Budget cap: a spending or turn limit set before the run
- The floor: actions that always need a person, however trusted the agent
Facts that move (checked November 24, 2026)
- Claude Code: reads need no approval; edits and commands do; deny rules win (Anthropic)
- Grok Bot: "ask first" wins; approvals do not undo finished work; test runs do real work (xAI)
- Headless caps: --max-budget-usd and --max-turns (Anthropic)
- Remote actions cannot be checkpointed (Anthropic)
Stop when the agent
- Repeats the same fix
- Wanders out of scope
- Asks for wider permissions to get unstuck
- Claims without showing
- Reaches outside the computer uninvited
- Costs more than the work is moving
A starting floor for a practice
- No agent opens client records, notes or billing exports
- No message goes to a client unread
- No agent touches the EHR, scheduling or payments
- Every account has a spend limit
- You read anything published under your name
Check what you learned
10 questions from this lesson. Answers are checked as you go; nothing is recorded.
1 / 10
Why can a mistake cost more with an agent than with a chatbot?
Hint
Errors stack.
Anthropic notes agents can compound errors. One misreading early can shape twenty changes.
2 / 10
In Claude Code, which action needs no approval by default?
Hint
Looking is free.
Reads need no approval; edits and commands do unless you allow them.
3 / 10
When an allow rule and a deny rule conflict, which wins?
Hint
Caution first.
Deny wins.
4 / 10
When should you move an agent up one step of the trust ladder?
Hint
A track record, for that job.
Trust is earned per kind of job, with a record of supervised work.
5 / 10
What does Grok Bot's documentation say about an approval card?
Hint
Before, not after.
Approval cards stop an action; they do not reverse completed work.
6 / 10
A Grok Bot routine's test run sends an email. What happened?
Hint
No rehearsal for the outside world.
Test runs of routines do real work.
7 / 10
What is the habit at the heart of review?
Hint
Claims versus evidence.
The summary is a claim. The changed lines, screenshot or output are the evidence.
8 / 10
Which two headless settings stop an unattended Claude Code run?
Hint
Money and rounds.
They cap spend and the number of rounds.
9 / 10
Which of these is a sign to stop an agent?
Hint
Explain, do not widen.
An agent that wants broader permissions to get unstuck should explain the obstacle instead.
10 / 10
Why do sends, payments, deletes and live deploys sit on the floor rather than the ladder?
Hint
No rewind for the outside world.
A rewind restores local files only. It cannot unsend, refund or restore a deleted record.
Worth another look