Coding agents repeat the wrong precedent. Here is what stops them
Four pre-registered studies, 588 agent runs: agents copy the wrong precedent near a change, the project tests do not stop it, a test for the rule does, and one sentence at the old wrong code prevents most violations.