Lesson · 12 min
Scope and steer
Plan first, constrain the files, interrupt early.
Agents fail in characteristic ways: they expand scope, they 'improve' code you did not ask to change, they assume a library you do not use. Steering is mostly preventing those.
- Ask for a plan before edits on anything larger than a one-file fix.
- Name the files it may touch. Name the files it must not.
- Give the commands it should run (test, typecheck, lint) rather than 'make sure it works.'
- If the plan is wrong, correct the plan — do not let it start.
Propose a plan for adding retry with backoff to the xAI client in src/lib/xai.ts. Max 3 steps. Do not edit yet. Do not introduce a new dependency. After I approve, implement only that plan.
Interrupt as soon as you see drift. A polite 'stop, you are in the wrong file' after 40 seconds is cheaper than a revert after 8 minutes.