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
  1. Assisted mode for delicate work.
  2. A task agent for well-specified work, with the tests as its contract.
  3. Orchestration for broad work that splits into separate pieces.
  4. Designing it: independent pieces, focused context, structured outputs, verification.
  5. Stop signals: scope creep, loops, weakened tests, swallowed errors.
  6. Cost: agree a budget before fanning out.
taskmodewhy
add an endpoint from a precise spec, tests listedtask agentclear contract, cheap verification
migrate 40 components from one API to anotherorchestrated, one sub-agent per batch, a verification stagebroad, separable, mechanical
review a large PR across security, performance and accessibilityorchestrated, one reviewer per dimension, findings verifieddifferent lenses, independent
change the ledger's posting logicassisted, with a human writing the tests firstmoney correctness; mistakes are expensive
debug a production incidentassisted: the agent reads logs and proposes; humans actactions on production stay human
explore an unfamiliar codebasetask agent in read-only mode, then a written mapcheap, 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.