A coding agent can drive a bug fix end-to-end — reproduce, locate, fix, verify, commit — but you stay in control by gating the loop with scoped permissions, human approval, and small reversible steps. The agent does the typing; you decide what actually lands.
The loop
1. REPRODUCE → write/run a failing test that demonstrates the bug (red)
2. LOCATE → search the codebase, read the relevant files, form a hypothesis
3. PROPOSE → draft a minimal fix (you can review the plan before any edit)
4. VERIFY → run tests + lint/typecheck → fix is proven by the test going green
5. REVIEW → show the DIFF for your approval (nothing committed yet)
6. COMMIT → only after approval, on a branch, with a clear message
