Restricting what they can touch

You'll finish with: No agent can do more than its job needs.

The most common agent mistake isn't a bad prompt. It's giving a worker more access than its job needs.

Who gets to touch what

Read
Write
Run commands
Researcher
Reviewer
Proposal
Admin

Two of the five can't change anything at all. That's deliberate.

A reviewer with write access will eventually rewrite what you asked it to review. Not because it's broken — because fixing looks helpful. Take the ability away and the problem disappears.

How to set it

The tools line is an allowlist. If it's not on the list, the agent can't do it — with one exception that matters, below.

Turning on memory turns on writing. If you set memory: on an agent, Claude Code automatically enables Read, Write and Edit so it can keep its own notes — whatever your tools line says. An agent you meant to be read-only is not read-only any more.

So: leave memory off the reviewer. A checker that can edit the thing it is checking is the exact failure this chapter exists to prevent. Memory is fine on a researcher, where writing notes is the point.

# Read-only — can look, can't touch
tools: Read, Grep, Glob

# Can also write files
tools: Read, Write, Edit, Grep, Glob

# Can also run commands — use sparingly
tools: Read, Write, Edit, Grep, Glob, Bash
Plain English

Read opens a file. Grep and Glob search for things. Write and Edit change files. Bash runs commands on your computer — that's the one to be careful with.

Do this now
  1. Open every agent file you've made.
  2. Ask of each: does this job genuinely need to change files? If not, cut it back to Read, Grep, Glob.
  3. Only the admin agent should have Bash. If everything has it, you've given away the keys.
How to know it worked

Ask the reviewer to fix something rather than report it. It should tell you it can't edit and give you the change to make yourself.

If it edits the file anyway, check two things in that order. First: does the agent have a memory: line? That quietly adds Read, Write and Edit no matter what your tools list says — take it off the reviewer. Second: did you restart after saving? Agent files are read at startup, so an unsaved or unrestarted change looks exactly like a change that didn't work.

Now you need something to coordinate them — that's the last chapter.

All courses · Start here · Privacy