ContextCov: Deriving and Enforcing Executable Constraints from Agent Instruction Files
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
As Large Language Model (LLM) agents increasingly execute complex, autonomous software engineering tasks, developers rely on natural language instruction files such as AGENTS.md to express project-specific coding conventions, tooling restrictions, and architectural boundaries. However, because these instructions remain passive text, agents frequently violate documented constraints due to context window saturation or conflicting local context. In autonomous settings without real-time human supervision, such violations rapidly compound into technical debt. To ground autonomous agents in repository constraints, we introduce ContextCov, a framework that transforms passive natural language instructions into executable guardrails. Unlike prompt-only or reflection-only compliance approaches, ContextCov compiles documented constraints into three complementary checks: static AST queries for code patterns, runtime shell shims that intercept prohibited commands, and architectural validators that enforce structural rules. Acting as an automated, continuous reviewer, ContextCov intercepts agent actions and returns immediate, reproducible violation traces, enabling self-correction before non-compliant changes are finalized. We evaluate ContextCov on SWE-bench Lite (12 repositories, 300 tasks). Compared to prompt-only and LLM reflection baselines, ContextCov achieves 88.3% constraint compliance (vs. 67.0% and 50.3%) with 3.4x lower feedback cost, while maintaining functional correctness. The source code and evaluation results are available at https://github.com/reSHARMA/ContextCov.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 18 of its 68 references that are in the map. First posted on arXiv 28 Feb 2026.
Builds on
18 of 68 references.
Closest ancestors · 3
Same direction, newest first
- 2026AgentRx: Diagnosing AI Agent Failures from Execution Trajectories2 Feb
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
Other references · 15
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
- 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
- 2019Getafix: Learning to Fix Bugs Automaticallycited by 40
- 2025Control Illusion: The Failure of Instruction Hierarchies in Large Language Modelscited by 31
- 2020Learning to Update Natural Language Comments Based on Code Changescited by 30
- 2018Categorizing the Content of GitHub README Filescited by 18
- 2022Code Search: A Survey of Techniques for Finding Codecited by 18
- 2025On the Effectiveness of LLM-as-a-judge for Code Generation and Summarizationcited by 17
- 2024Interpreting and Mitigating Hallucination in MLLMs through Multi-agent Debatecited by 16
- 2025LLMs can be easily Confused by Instructional Distractionscited by 12
3 more
- 2025A Systematic Literature Review of Code Hallucinations in LLMs: Characterization, Mitigation Methods, Challenges, and Future Directions for Reliable AIcited by 6
- 2025The Introduction of README and CONTRIBUTING Files in Open Source Software Developmentcited by 3
- 2020Long-Term Evaluation of Technical Debt in Open-Source Softwarecited by 2
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Natural-Language Agent Harnessescited by 54
- 2026Getting Better at Working With You: Compiling User Corrections into Runtime Enforcement for Coding Agentscited by 2
- 2026Learning Correct Behavior from Examples: Validating Sequential Execution in Autonomous Agentscited by 1
- 2026OneDayAgent: Towards a Long-Horizon Harness for Autonomous Agentscited by 1
- 2026Toward Measuring Structural Drift in LLM Communication Loopscited by 0
- 2026OneDayAgent: Towards a Long-Horizon Harness for Autonomous Agents4 Aug 2026
- 2026Getting Better at Working With You: Compiling User Corrections into Runtime Enforcement for Coding Agents11 Jun 2026
- 2026Learning Correct Behavior from Examples: Validating Sequential Execution in Autonomous Agents4 May 2026
- 2026Natural-Language Agent Harnesses26 Mar 2026
- 2026Toward Measuring Structural Drift in LLM Communication Loops18 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agents
- 2026ARGUS: Defending LLM Agents Against Context-Aware Prompt Injection
- 2026Harness Engineering for Agentic AI Coding Tools: An Exploratory Study
- 2025Context Engineering for AI Agents in Open-Source Software
- 2026Constraint Decay: The Fragility of LLM Agents in Backend Code Generation
- 2026ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools
- 2025Context Engineering for Multi-Agent LLM Code Assistants Using Elicit, NotebookLM, ChatGPT, and Claude Code
- 2026MANTRA: Synthesizing SMT-Validated Compliance Benchmarks for Tool-Using LLM Agents