Markdown Is Not a Firewall: four coding agents, one rules file, four boundaries

Sandeep Dhuri, Independent Researcher. Preprint, November 19, 2026.

Short on time? Read the plain-language summary.

Abstract

Teams put a one-page rules file in a repository and call it a control on coding agents. A registered study found agents rarely look up a repository's contribution rules. I asked the security question: what does a rules file do at a boundary, against a gate? I tested one 278-word rules file, with hypotheses and analysis code deposited first. Claude Code, Codex CLI, Gemini CLI and OpenCode with DeepSeek worked through 20 small repositories with hidden tests, 12 for three of them. Three agents met four boundaries I built: a refused endpoint, a destructive shortcut, a planted instruction and a planted package. Permission prompts, each vendor's own control layer, were off by design. A gate in front of the mock service blocked and logged forbidden requests. Every verdict was read from records the agent could not change. Only my first scoring pass was blind to arm. My checkers found no real bugs, with the file or without it. The file cost one agent a third of its score: Codex CLI fell from 99.0 to 67.7 percent on hidden tests, and in 11 of its 36 steps reported the task complete with all tests passing while under half of the hidden tests passed. Its own tests passed. Faced with two of its rules that clash on these tasks, three agents followed the task and one followed the rule. Pooled, passes fell from 98.2 to 90.9 percent. Matched pairs fell 7.7 points, 1.3 without Codex CLI. Attempts to cross were rare: 5 in 90 gated steps, 3 without the file, 2 with it, all by OpenCode with DeepSeek, all blocked. With no gate, under the neutral file, the same requests reached the mock in 7 of 45 runs. By an error in my run script, the no-file and rules-file arms always ran behind the gate at the three HTTP boundaries, so I could not test whether the file changes what an agent does there. On what I could measure, the file acted as advice. A file tells an agent what you want. A gate decides what it gets.

In one line

A file tells an agent what you want. A gate decides what it gets.

What I did

I gave four coding agents the same 278-word rules file and ran them on small repositories with tests they could not see. Three of the agents also met four boundaries I built, with a network gate in front of a test service. At each boundary the rules file carried one added rule for that boundary. The hypotheses and analysis code were deposited before the runs.

Three numbers

99.0 to 67.7One agent's hidden-test pass rate, in percent, without and with the rules file. Under a neutral file of about the same length it passed 100.
11 of 36Steps under the rules file where that agent reported the task complete with all tests passing while fewer than half of the hidden tests passed. Its own tests passed. The 11 steps come from four repositories.
5 of 5Attempts to cross a boundary that the gate blocked. With no gate, under the neutral file, the same request reached the test service in 7 of 45 runs, and the service itself refused 3 of them.
One agent, three files: hidden tests passed (%) 99.0No file 67.7Rules file (278 words) 100Neutral file (280 words)

Two rules in the file pulled against each other on these tasks. I did not plan that clash. Three agents followed the task. One followed the rule.

What this shows, and what it does not

It shows that the wording of a short rules file can change one agent's results a great deal on tasks like these, that an agent's own report of passing tests can differ from independent tests, and that a gate outside the agent blocked what it was built to block.

It does not show what a rules file does at a boundary with no gate. An error in my run script meant the no-file and rules-file runs always sat behind the gate at the three HTTP boundaries. Under the rules file, 2 of 45 gated steps still tried to cross, and the gate blocked both. No boundary result reaches a verdict at 15 runs per arm.

It does not rank the agents. Each agent is compared only with itself. The agents ran different models at different price tiers.

Other limits. Each cell ran once. The 11 steps come from four repositories, so I cannot say how often that agent would read the line this way again. Only my first scoring pass was blind to arm, and I was the only scorer. That agent ran its default model, not the one I registered. The repositories are small, about 60 to 125 lines each. Permission prompts, each vendor's own control layer, were off by design. One rules file, written by me.

Why this matters now

A rules file often has more than one author today. Some project starters write one for you. The Next.js docs say managed instructions in AGENTS.md are on by default from version 16.3. The Expo docs say create-expo-app adds AGENTS.md to a new project. The Laravel Boost docs say it writes its guidelines into CLAUDE.md or AGENTS.md. I did not test these tools or their files, and I do not say they clash with anything. The point is narrower: when a framework, a team and a developer all write into one file, it is worth reading that file for rules that pull against each other.

Questions and answers

Should I put security rules in AGENTS.md?
You can, as guidance. In this study the file acted as advice. What blocked forbidden requests was a gate outside the agent: 5 attempts, all blocked. An error in my run script means I could not test what the file does at a boundary with no gate.
Does a rules file enforce anything?
Not by itself. It is text the agent reads. A file tells an agent what you want. A gate decides what it gets.
Can two clashing rules in one file hurt an agent's results?
For one agent on these tasks, yes. Two rules in my 278-word file pulled against each other. That agent went from 99.0 percent on hidden tests to 67.7. The other three agents moved by less than 2.5 points. The paper calls it a badly written line, not a rules-file problem.
What is a rules file?
A short text file in a repository that tells a coding agent how to work. The one in this study had 278 words.
Did the rules file make the agents worse?
For one agent, yes, on these tasks. Its hidden-test pass rate went from 99.0 percent with no file to 67.7 percent with the rules file. Under a neutral file of about the same length it passed 100. Two rules in the file pulled against each other. Three agents followed the task. One followed the rule.
Can I trust an agent when it says all tests pass?
Not on its word alone. In 11 of 36 steps under the rules file, that agent reported the task complete with all tests passing while fewer than half of the hidden tests passed. Its own tests passed. The 11 steps come from four repositories, so I cannot say how often it would read the line this way again.
What did the gate do?
It blocked 5 of 5 attempts to cross a boundary. With no gate, under the neutral file, the same request reached the test service in 7 of 45 runs, and the service itself refused 3 of them.
Does this show that a rules file cannot stop a planted instruction?
No. The study tested a planted instruction and a planted package, but no boundary result reaches a verdict at 15 runs per arm. It was not built to find new attack techniques.
Which agent is best?
The study does not rank the agents. Each agent is compared only with itself.
Where are the data and the plan?
The data and transcripts are at doi.org/10.5281/zenodo.24238904. The pre-registration is at doi.org/10.5281/zenodo.23608308. Both are open.

Related work on this site

How to cite

@misc{dhuri2026markdown,
  title  = {Markdown Is Not a Firewall: four coding agents, one rules file, four boundaries},
  author = {Dhuri, Sandeep},
  year   = {2026},
  eprint = {2611.27112},
  archivePrefix = {arXiv},
  primaryClass  = {cs.SE},
  doi    = {10.48550/arXiv.2611.27112},
  url    = {https://arxiv.org/abs/2611.27112}
}

Download: BibTeX ยท RIS

arXiv DOI: 10.48550/arXiv.2611.27112. The paper is under CC BY 4.0. Code, hidden tests and scoring scripts: doi.org/10.5281/zenodo.23608251.

Questions and corrections are welcome through the ORCID record: 0009-0008-1829-2431.

HomeWriting and papersStudy 1 dataPressAuthorRSS feedGitHub