The agent loop
The habit that separates engineering from vibes: context, plan, act, verify. Then targets the agent can check, parallel runs and recovery.
Start: Context, plan, act, verifyAbout All tools
The agent loop is the working habit for any coding agent: give it context, have it plan, let it act, then verify the result. This pack teaches you to write task briefs, give the agent a check that passes or fails, and judge a run by its evidence. Later lessons cover running agents in parallel and recovering from a run that goes wrong.
Best for: Anyone using Claude Code, Cursor, Codex or GitHub Copilot who wants results they can trust.
Good for
- Writing a task brief that says where, what, how to check and what to leave alone
- Fixing bugs test-first so the agent has a clear target
- Running agents side by side in separate worktrees
- Getting back on track after a bad run
Where people slip
- Trusting "all tests pass" without seeing the command and its output
- Letting an agent weaken or skip the test it should pass
- Correcting a drifting agent a third time instead of starting fresh
- Missing edits outside the task's scope
What is the agent loop?
Context, plan, act, verify. Give the agent the files and the goal, have it plan, let it make the change, then check the result with a test or command. Save a checkpoint when it works.
What makes a good task brief?
Say where to work, what to change, how to check it's done and what not to touch. A check that comes back pass or fail, like a test, helps most.
When should I start over instead of correcting the agent?
Interrupt as soon as it drifts. If two corrections haven't fixed it, clear the session and write a better prompt instead of trying a third time.
Can I run more than one agent at once?
Yes, if the tasks are independent. Give each one its own git worktree or cloud branch so they don't collide. A fresh worktree may need its .env file and dependencies set up.
Checked against All tools's own docs on 2026-11-06.
Run the loop
Brief an agent with context and limits, get a plan, and verify the result yourself.
0 of 2 lessons completeGive the agent a target it can check
Turn a task into a test that passes or fails, and judge the run by its evidence.
0 of 2 lessons complete