Beyond Prompts: Runtime Contracts for Coding Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Coding agents act on repositories through shell commands and file edits, and teams steer them with written engineering rules. Industrial settings expect such rules to be enforced and their application to be evidenced, and a rule given as prompt text provides neither. We test whether executable contracts enforced while the agent works reduce rule violations compared with the same rules in the prompt, retrieved as guidance, or checked only after generation. Violations are scored by an oracle whose methods differ from the in-loop checks, and the oracle is validated by two human reviewers and a model reviewer. Across three studies on two model families (240, 112 and 108 runs), enforcement during execution produced no oracle-detected violation in 104 paired runs, against 21 to 55% of runs without rules, and no loss of functional correctness in the two confirmatory studies. In the confirmatory study on tasks aimed at known failure situations (Study 3, protocol hashed before the first run), enforcement lowered the share of violating runs by 31 percentage points relative to no rules (Holm-adjusted p = 0.014); the 17-point difference from prompted rules was not significant (p = 0.12), and neither was any contrast in Study 2, where only 3 of 14 tasks produced a violation. Prompted rules removed some violation types but not recursive deletes of scratch directories, and checks after generation repaired file edits but not commands that had already run. That enforcement satisfies the rules it enforces is expected by construction; what the data add is where prompting falls short, the absence of a functional cost, and the limits of the rules and of the oracle themselves. The studies use low-cost models and one small fixture.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 12 of its 26 references that are in the map. Submitted 14 Nov 2026.
Builds on
12 of 26 references.
Closest ancestors · 6
Same direction, newest first
- 2026NOMOS: Compiling Written Policies into Statically Verified Tool-Call Gates for LLM Agents8 Oct
- 2026Correct Code, Broken Contributions? SWE-CC: Benchmarking Repository Policy Compliance for Coding Agents5 Oct
- 2026ZORO: Active Rules for Reliable Vibe Coding17 Apr
- 2026ContextCov: Deriving and Enforcing Executable Constraints from Agent Instruction Files28 Feb
- 2025SWE-Effi: Re-Evaluating Software AI Agent System Effectiveness Under Resource Constraints11 Sep
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 6
- 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agentscited by 276
- 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 119
- 2026Towards Verifiably Safe Tool Use for LLM Agentscited by 42
- 2025Guidelines for Empirical Studies in Software Engineering involving Large Language Modelscited by 31
- 2025When Developer Aid Becomes Security Debt: A Systematic Analysis of Insecure Behaviors in LLM Coding Agentscited by 9
- 2023Registered Reports in Software Engineeringcited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Getting Better at Working With You: Compiling User Corrections into Runtime Enforcement for Coding Agents
- 2026Coding Agents Don't Know When to Act
- 2026Coding Agents Are Guessing: Measuring Action-Boundary Violations in Underspecified DevOps Instructions
- 2026Dependable Agents Need Hard and Fuzzy Rules
- 2026Bias in the Loop: Auditing LLM-as-a-Judge for Software Engineering
- 2026When Passing Checks Do Not Establish Completion: Evidence Interpretation in Coding Agents
- 2026SWE-MISBEHAVIOR: Benchmarking and Mitigating Boundary Violations in Software Coding Agents
- 2026Agent Safety Should Be a Runtime Contract