Freeze after two failed repairs.
A third patch without a better theory is usually transcript drift wearing a hard hat. Stop and write the card.
Use this when Claude Code, Codex, or another coding agent keeps patching without getting closer. The fix is a stop contract: write the failing repro, the invariant, and the exact proof command before touching one more file.
A third patch without a better theory is usually transcript drift wearing a hard hat. Stop and write the card.
"It still fails" is not enough. Capture the command, URL, log line, fixture, or visible behavior that proves the failure.
Most bad fixes change the output shape, auth boundary, data format, or user flow while claiming victory. Put the thing that must not move in writing.
If the agent wants to refactor a module to fix one failing case, it is probably avoiding the hard diagnosis. Smaller diff first.
Do not let the agent invent a friendlier test after the fix. Re-run the command or workflow that exposed the bug unless there is a documented reason not to.
Done, stuck, and ask-a-human need explicit definitions. Otherwise the agent will keep buying time with confident edits.