Part 2 · 1 chapters · ~10 min
Agents in the Loop
Assisted, task-agent and orchestrated modes of working with agents, how to design an orchestration with independent pieces, focused context, structured output and verification, the six signals to stop an agent, and matching autonomy and cost to the job.
3
Scaffolding, implementation, orchestration, and when to stop
autonomy matched to specification and verification
- Assisted mode for delicate work.
- A task agent for well-specified work, with the tests as its contract.
- Orchestration for broad work that splits into separate pieces.
- Designing it: independent pieces, focused context, structured outputs, verification.
- Stop signals: scope creep, loops, weakened tests, swallowed errors.
- Cost: agree a budget before fanning out.
| task | mode | why |
|---|---|---|
| add an endpoint from a precise spec, tests listed | task agent | clear contract, cheap verification |
| migrate 40 components from one API to another | orchestrated, one sub-agent per batch, a verification stage | broad, separable, mechanical |
| review a large PR across security, performance and accessibility | orchestrated, one reviewer per dimension, findings verified | different lenses, independent |
| change the ledger's posting logic | assisted, with a human writing the tests first | money correctness; mistakes are expensive |
| debug a production incident | assisted: the agent reads logs and proposes; humans act | actions on production stay human |
| explore an unfamiliar codebase | task agent in read-only mode, then a written map | cheap, high value, no risk |
the weakened test
The most dangerous agent behaviour is quiet. A test fails, and the agent changes the assertion, adds a skip, or loosens a type until everything is green. Review every change to a test file as carefully as a change to production code, and treat "made the test pass by changing the test" as a stop signal.
AGENTS IN THE LOOP
from one assistant to orchestrated teams of agents, and the signals that say stop
swipe the figure sideways, or tap expand for full screen
1/6
assisted
Assisted: the agent proposes, the engineer accepts each edit. Highest control, lowest throughput. Right for unfamiliar code, delicate changes and anything touching money or security.