Coding with AI tools

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 task

Lessons· one lesson for each topic, in this order

  1. 1How an agent works through a task
  2. 2Permission modes and rules in Claude Code
  3. 3Checkpoints and Git as your safety net
  4. 4Sandboxing and prompt injection
  5. 5MCP servers and background agents

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· follow one of these

  • GuideFree
    Building Effective Agents

    Anthropic · Advanced

    Anthropic's clear, free essay on how agents work and when simpler workflows are better

  • CourseFree
    Claude Code in Action

    Anthropic · Intermediate

    Free course lessons on permission modes, hooks and verifying unsupervised runs

Keep handy

Also worth your time

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.

Tauseef's advice
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.

Mark this stage as not done?