Runtime contracts cut coding-agent rule violations in small arXiv study
A preprint reports that enforcing engineering rules as executable checks while coding agents work reduced violations, though gains over plain prompted rules were not statistically significant.
In plain words
Coding agents change software by running commands and editing files, and teams usually state their rules as text in the prompt. The paper's authors tested enforcing those rules with executable contracts during execution. In their studies this prevented detected violations without hurting the agents' task results, but the advantage over simply prompting the rules was not statistically proven.
What was announced
The arXiv preprint argues that rules given as prompt text cannot be enforced or evidenced, which industrial settings expect. The authors compared executable contracts applied while the agent works against the same rules delivered as prompts, retrieved as guidance, or checked only after generation. Violations were scored by an oracle using methods different from the in-loop checks, with validation by two human reviewers and a model reviewer.
Across three studies on two model families, 104 paired runs showed no oracle-detected violation under enforcement, while runs without rules violated rules 21 to 55 percent of the time, with no loss of functional correctness in the two confirmatory studies. In the confirmatory study on known failure situations, enforcement cut violating runs by 31 percentage points versus no rules, but the 17-point gap from prompted rules was not significant. Prompted rules missed recursive deletes of scratch directories, and post-generation checks could not repair commands that had already run. The authors note the studies used low-cost models and one small fixture.
What it does not show
- The studies used low-cost models and one small fixture, so results may not generalize to other settings.
- The advantage of enforcement over prompted rules was not statistically significant, and Study 2 contrasts were not significant, with only 3 of 14 tasks producing a violation.
- The source is only the paper's abstract; the full article was not reviewed, and the findings have not been independently confirmed.
For security and IT teams
- Scope
- The evidence covers coding agents acting on repositories through shell commands and file edits, tested on low-cost models and one small fixture.
Sources
Source-support review completed 28 Nov 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 28 Nov 2026
New to the subject? AI from the Ground Up starts from the beginning.