Recap and Practice
Key takeaways
- Agents multiply your ability to say what you want precisely and to recognize when you got it — they don't replace it.
- Scoping pays off twice: a tightly scoped task produces a diff you can actually review, while a loose one produces one you can't.
- Review the diff, not the codebase —
git diff --statflags scope creep in seconds, and a green test suite is never a substitute for running the thing. - Never run an unthrottled loop against a paid ; give every loop a hard cap — max iterations, a spending limit, or a timeout.
- Watch the first runs in the foreground to confirm the agent converges before you trust it to run in the background.
Try it
Take a small, well-bounded task and hand it to an agent with an explicit stop condition ("stop after 3 attempts" or "stop if tests still fail twice"). Watch the run end to end in the foreground, then review only the diff with git diff --stat followed by git diff. If the changes touch more files than you scoped, that's your signal to tighten the brief and run it again.
Prompt of the chapter
I'm giving you an autonomous task. Obey these guardrails exactly:
- SCOPE: only touch [list the files/modules]. If the fix needs more,
STOP and tell me instead of expanding scope.
- GOAL: [one concrete, checkable outcome].
- STOP CONDITIONS: stop after 3 attempts, OR if tests fail twice in a
row, OR if you've made changes outside the scope above.
- COST: do not call any paid API in a loop without a hard cap.
- REPORT: when you stop, show me `git diff --stat`, the test result,
and one sentence on whether you converged or got stuck.
Begin, and narrate each attempt so I can watch you converge.