Stage 7 of 10 · 5 lessons · ~2 weeks
Agents: multi-file changes, permissions and safety
Understand the agent loop, choose permission modes and rules deliberately, undo with checkpoints and Git, sandbox what you can, and guard against prompt injection, risky MCP servers and unreviewed background work.
Start: How an agent works through a taskLessons· one lesson for each topic, in this order
Do this
- Choose a permission mode on purpose and write down why.
- Add allow rules for your test and lint commands, and deny rules for pushes and secret files.
- Do a multi-file change on its own branch from a clean commit.
- Roll back a bad change once with a checkpoint and once with Git.
- Read one MCP server's tools before connecting it, and connect it read-only if you can.
- Review one background or long-running agent result as carefully as a stranger's pull request.
Start with
- GuideFreeBuilding Effective Agents
Anthropic · Advanced
Anthropic's clear, free essay on how agents work and when simpler workflows are better
Keep handy
Also worth your time
Auto-review, Allowlist and Run Everything, permissions.json and sandboxing
- OWASP Top 10 for LLM ApplicationsGo deeper
Prompt injection and excessive agency explained by the security community
Before moving on: Your tool configured with a deliberate permission mode, allow rules for your test and lint commands, deny rules for pushes and secrets, a multi-file change done on its own branch, and one rollback you practised with both a checkpoint and Git.

Autonomy is something you grant in proportion to how easily you can undo the result. Start strict, loosen only for actions you have approved many times, and never give broad permissions on a repository or website you have not read. Git, not the tool, is your real undo button.