Coding with AI tools

Stage 7 · Lesson 1 of 5

How an agent works through a task

Agents: multi-file changes, permissions and safety

An agent runs a loop: read the task, choose a tool (read a file, search, edit, run a command), look at the result, decide the next step, and repeat until it judges the task done. It is powerful because it gathers its own context and checks its own work, and risky for the same reasons: it acts on its guesses, and each step builds on the last.

Knowing the loop tells you where to steer. Give it a good start: a spec, the right files and a check to run. Watch the first few steps; if it heads the wrong way, stop it early, since redirecting after two steps is cheap and after twenty is not. For multi-file changes, ask for a plan first.

Common trapwalking away from a long task with no check it must pass, then finding it finished something else.

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

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

Mark this stage as not done?