Terminal
culprit localise 77f60c9fccf8Takes the run ID from culprit run. The run must have ended found.
What it does#
- Splits the culprit commit's diff into hunks.
- Asks a model to rank them, using the diff, the commit's intent and the failing tasks.
- Reverts the top hunks one at a time on the culprit commit and re-runs the telling tasks. The first revert that turns BAD into GOOD is the responsible hunk.
- If no single revert is enough, tries pairs of those hunks. Some regressions need two changes together.
- If no pair works either, the answer is the whole commit.
Each revert is judged with the same decision rule as a bisect step.
Cost and resuming#
Localisation has its own cap (--budget-usd), on top of what the run already cost. Running the same
command again resumes it, reusing every revert already measured.
Options#
| Option | Default | Description |
|---|---|---|
--top-n N |
3 | Hunks whose single revert is tested, in rank order. |
--max-pairs N |
3 | Pairs of those hunks tried when no single revert restores the agent. |
--budget-usd X |
1.50 | Cost cap, on top of the run's cost so far. |
--workers N |
4 | Agent runs in parallel. |
--replay |
off | Use only what the ledger holds: no key, model call or agent run. |
Exit code 0 when done, 1 if incomplete, 2 if the run doesn't exist or has no culprit.
Next#
Write and verify a fix with culprit fix <run_id>.