Docs
Workflow, in order

culprit localise

Step 3. Find which hunks of the culprit commit caused the regression.

Terminal
culprit localise 77f60c9fccf8

Takes the run ID from culprit run. The run must have ended found.

What it does#

  1. Splits the culprit commit's diff into hunks.
  2. Asks a model to rank them, using the diff, the commit's intent and the failing tasks.
  3. 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.
  4. If no single revert is enough, tries pairs of those hunks. Some regressions need two changes together.
  5. 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>.

Culprit 0.1.0 · Apache-2.0 · Team PiedPiper