Sub topic 13
When to re-run, narrow the task, or take over
This chapter assumes you can use Git branches, commits, and diffs. It also assumes you have reviewed an agent's change set and have given corrective feedback at least once. Sometimes feedback is not enough. This chapter helps you choose between three options when a change set is not acceptable as it stands.
The three options
After review, you have four outcomes: accept, partially accept, re-run, or take over. Accepting and partial acceptance are covered in earlier chapters. This chapter covers the other choices.
- Re-run means you discard the change and start the agent again from the same baseline. You use the same task, or a corrected version of it.
- Narrow the task means you split the work into smaller pieces. Each piece gets its own run, review, and commit.
- Take over means you finish the work by hand, using the agent's output only as a draft.
Every outcome depends on the clean baseline you made before the run. Because the agent worked on its own branch, you can discard its work without losing anything of yours.
Decision signals
Look at how the change set fails, not only how much is wrong.
| What you observe | Likely cause | Best response |
|---|---|---|
| Changes touch many unrelated files | Task was too broad or vague | Narrow the task |
| Correct idea, but the agent ignored a constraint | Constraint was missing or unclear | Re-run with a clearer task |
| One or two specific defects in otherwise good work | Small slip | Corrective feedback, then partial revert if needed |
| The same defect returns after two corrections | Agent is stuck on a wrong approach | Take over |
| Fix needs knowledge the agent lacks, such as a production incident detail | Missing context | Take over, or supply the context and re-run |
| Review takes longer than writing the change would | Poor cost balance | Take over |
Re-running
Re-run when the first attempt failed because of the task, not because of the model's ability. A typical sign is that the agent made reasonable choices from an ambiguous request. Fix the task text, then reset the branch so the new run starts clean.
git switch agent/rename-config-loader
git status --short # note anything you want to keep
git stash -u # save untracked files too, in case you need them
git reset --hard <start-commit> # the commit you noted before the rungit reset --hard destroys uncommitted work on the branch. Run it only on the agent's own branch, and only after you have checked that nothing there is worth keeping. The stash gives you a way back.
Add to the task what the first run lacked. Common additions are the files that are in scope, the files that are not, and the exact command that proves it is done.
Narrowing
Narrow when the change set is too large to review with confidence. A useful rule is that you should be able to state each run's purpose in one sentence. "Rename the loader function and update its callers" is one run. "Rename the loader, add caching, and update the docs" is three.
Run the pieces in order. After each one, review the diff, run your checks, and commit. Later runs then start from a verified state, and a failure points to one small change.
Taking over
Taking over is not a failure. It is the right choice when you would otherwise spend more effort steering than doing the work. Keep what is useful:
- Commit the agent's good hunks with
git add -p. - Revert the rest.
- Finish the remaining work yourself, then run the project's checks.
Exercise
An agent was asked to "modernize the config system." It changed 31 files, including billing code, and weakened two tests. Which response fits best, and what do you do first?
Show answer
Narrow the task. The request was too broad, which caused the scope creep. First reset the branch to the commit you noted before the run (stash anything you want to keep). Then split the work into runs with one-sentence purposes, for example "replace the config file parser in src/config/loader.py". Each run should name its in-scope files and require the existing tests to pass unchanged. Review and commit after each run.