Lesson 10.01 · Phase 10 · Coding & Computer-Use Agents

Anatomy of a coding agent

A coding agent is the Phase 3 loop with a particular toolbox: look around, read, edit, run. What makes it trustworthy is the last part. "Done" means a test run passed after the last edit, checked by your code, not claimed by the model. Every coding agent you'll meet, from Claude Code to SWE-agent, has these six parts.

Learning objectives

  • Name the six parts of a coding agent and point to each in about 150 lines of code.
  • Build a minimal agent that reproduces a failing test, reads code, edits it with approval, and re-runs the tests.
  • Verify completion in code: a passing test run after the last edit, not the model saying "done".
  • Map each part to how real coding agents implement it.

You ask an agent to fix a failing test. It reads the file, makes an edit, and says "Fixed! All tests should pass now." You merge it. They don't pass. The agent never ran them, or it ran them before its final edit.

Loading the full lesson…