Directing an AI agent that edits files, runs tests, and fixes errors.
Until now the AI lived in a chat window, and Sam did all the ferrying, copy the code out, paste it in, run it, carry the error back. Tonight she installs a coding agent: the same intelligence, but sitting inside her project. It can open her files, edit them, run the code and read the errors, itself.
BookNook's plan is ready from last lesson. Sam's first instinct is glorious, and wrong.
Predict the response
The agent is pointed at an empty BookNook folder. Sam, buoyed by a good plan, pastes the entire thing into the task box and presses go. Predict the next half hour.
Build all of BookNook from this plan: 1) add-book form 2) the list 3) Finished buttons. Off you go. I'll check back after tea.
What do you think the AI will do?
Look at what survived: the loop. Describe, generate, read, run, debug, refine, every step still happens; the agent just runs the middle four itself, dozens of times, at speed. What's left for Sam are the two ends: describe, now a task from the plan, and read, now a diff, the list of every change the agent made.
Here's one agent turn, slowed right down.
This lesson is part of the full course
The free lessons are just the opening chapter. Unlock the rest of Code with AI to keep going.