Security · ~7 min
When a layer fails — and one will — the damage is capped by the permissions you granted. Every permission the task doesn't need is attack surface you chose to keep.
Anthropic frames the whole trade-off as risk = likelihood × damage. Defense-in-depth
lowers likelihood; permission scoping lowers damage. The damage a compromised agent can do
is bounded by the permissions you grant it — and that bound is structural, because tool access is filtered
at the runtime layer before the model ever sees a request.
"Least privilege" is not one knob. Scope each of these independently to the task definition:
| Dimension | The question | Example bound |
|---|---|---|
| Tool access | Which tools can it invoke? | Research agent: Read, not Write or Bash |
| File scope | Which files can it touch? | Worktree limited to docs/, never .github/ |
| Permission mode | What human interaction? | acceptEdits vs ask-on-first-use |
| Repo access | What can it push? | Copilot pushes only to copilot/ branches, never main |
tools field controls what the runtime exposes, not what the model requests. A successful injection
cannot invoke a tool the runtime never made available.Rather than one agent with broad permissions, chain narrow-scoped agents — each holding only the permissions for one operation. A documentation pipeline splits cleanly:
A prompt injection into the research agent cannot write files; an injection into the draft agent cannot push to remote. The broad agent's worst case is replaced by three narrow ones.
Scoping caps per-action damage. It does not cap time-integrated damage on its own.
A Kiteworks 2026 report found 60% of organizations cannot terminate a misbehaving agent. A narrowly-scoped agent still accumulates damage between detection and shutdown if there's no kill switch. Pair permission scoping with a termination path the agent cannot block — a supervisor heartbeat, a harness circuit breaker, or an external orchestrator timeout — so bounded radius and bounded duration hold together.
Before deployment, run the audit: What's the broadest action this agent could take? If injected, what's the worst-case outcome? Which permissions exist for convenience, not necessity? Remove every permission you can't justify from the task definition.
tools is enforced below the model.Retrieval practice — recall, don't peek
Question 1Permission scoping primarily lowers which term of risk = likelihood × damage?
Question 2The tools field in agent frontmatter is enforced by…
Question 3Decomposing one broad agent into a narrow chain reduces…
Question 4Scoping bounds per-action damage but not duration, so pair it with…
Question 5 · spaced recall from Lesson 7Schema-level tool filtering is stronger than runtime rejection because…