arXiv:2611.04367cs.SENov 2026

Manuscript Offprint

arXiv:2611.04367

Do Coding Agents Follow AGENTS.md? The Effect of Policy Wording on Instruction Compliance

Rikuto Tsuchida, Youmei Fan, Kazumasa Shimari, Raula Gaikovina Kula, Kenichi Matsumoto

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Rikuto TSUCHIDA†a), Youmei FAN†b), Kazumasa SHIMARI††c), Raula GAIKOVINA KULA†††d), Nonmembers, and Kenichi MATSUMOTO†e), Fellow

SUMMARY Coding agents do not always follow the policies in an Agent Context File (ACF). We inserted one policy, in four styles, into the ACFs of 86 benchmark tasks across four harness-model combinations. Conditional phrasing was followed less often than Prescriptive and Explanatory. The better of those two varied by combination.

key words: AI Agent, Agent Context File, instruction compliance, large language model

1. Introduction

In recent years, autonomous AI agents such as Claude Code and Codex have come into use in open-source development[1]. They break down natural language prompts into tasks, writing and executing code with little human intervention. Developers configure the behavior of these agents mainly through an Agent Context File (ACF). An ACF is a Markdown file written in natural language, such as AGENTS.md, that describes a project's background and instructions. Developers place this in the repository root or in the user's personal settings[2]. A study of 2,853 open-source repositories found that 90.6% of them contained an ACF[1], suggesting that ACF serves as the primary way developers configure AI agents.

However, an AI agent does not always comply with the policies written in an ACF. We call an instruction that a developer wants an AI agent to follow a Policy. Previous studies have shown that LLMs often generate outputs while ignoring policies contained in prompts[3]. This can also occur in AI agents using LLMs as their base technology, and evaluations of AI agents running on repositories showed that compliance with individual policies reached only 79.75% to 85.64%[4]. Furthermore, an evaluation focusing on open source contribution rules reported that compliance with rules requiring contribution rejection was 0% across all four models, and providing the exact rule text in the prompt did not improve the results[5]. Because an ACF is loaded at the start of every session and its policies apply to every task in that session[2], compliance with an ACF policy matters more

than compliance with a policy given in a single prompt.

How a policy is written may affect whether an agent complies with it, but this has not been studied. The factors examined so far, the length of the ACF, the position of the policy within the file, the file structure, and the presence of conflicting policies, have not changed the compliance rate[6]. Previous research has shown that prompts with the same meaning but different phrasing affect the correctness or vulnerability of the code written by LLMs[7]. Therefore, the writing style of a policy may also change how often an AI agent complies with it.

In addition, the effect of writing style may not be consistent across models and harnesses. Different developers use different harnesses and models but share a single ACF[1]. Because models and harnesses may differ in their alignment methods and training data, a writing style that works in one environment may not work in another.

This study examines whether policy writing style affects compliance rate, and whether this effect is consistent across the combinations of a harness and a model. As a case study, we took benchmark tasks from repositories that already contain an ACF and placed a single target policy into each repository's ACF. The policy we inserted can be checked mechanically, and like the policies developers write in real ACFs, such as "never commit credentials", "always run the linter before finishing", and "do not edit generated files", it applies to every change the agent makes during a session. We tested four styles: Prescriptive, Explanatory, Conditional, and Prohibitive. For every session we judged whether the agent complied with the policy, and calculated the compliance rate for each writing style. This paper addresses the following research questions.

  • RQ1: Does the writing style of a policy affect an AI agent's compliance rate?
  • RQ2: Is the effect of writing style on the compliance rate consistent across the combinations of a harness and a model?

This study makes two contributions. First, we show that writing a policy in a different style changes the compliance rate. Second, we show that the effect of writing style differs across four combinations of a harness and a model.