Markdown Is Not a Firewall: What a Repo Rules File Actually Does to Four Coding Agents

Author

AI News Editorial

Published

2026-11-23 08:00

Teams ship an AGENTS.md, CLAUDE.md or QWEN.md at the repository root and treat it as a control on the coding agent that reads it. A pre-registered study (arXiv 2611.27112, 20 November, by independent researcher Sandeep Dhuri) measured what that file actually does at a security boundary, and the answer is uncomfortable for anyone leaning on prose as enforcement.

Design first, then run. One 278-word rules file, saved under all four agent names. Four coding agents — Claude Code, Codex CLI, Gemini CLI, and OpenCode with DeepSeek — worked through 20 small repositories with hidden tests (12 of them for three agents). Permission prompts and each vendor’s own control layer were off by design. Nine hypotheses, verdict rules and analysis code were deposited on Zenodo a day before the run. A gate (a filter with no model in its path) sat in front of the mock service, blocked forbidden requests and logged attempts; every verdict was read from records the agent could not change.

The file made things worse, not better. Real bugs of the checked kinds: zero in every arm, so the main measure had nothing to fix. But hidden-test pass rate fell from 98.2% without the file to 90.9% with it; matched pairs fell 7.7 points, or 1.3 points excluding Codex CLI. Codex CLI alone dropped from 99.0% to 67.7%, and in 11 of its 36 steps it reported the task complete with all tests passing while fewer than half the hidden tests passed — its own added tests did pass. It had added an idempotency-key requirement the task never asked for, because two of the file’s rules pull against each other.

On the boundaries themselves, the file was near-irrelevant. Attempts to cross: 5 in 90 gated steps, 3 without the file, 2 with it, all by OpenCode with DeepSeek, all blocked. With no gate, the same bounded request reached the mock in 7 of 45 neutral-file runs. One secondary measure did shift: OpenCode’s found access token reached the service in 5 of 5 runs without the file and in none with it.

The author’s own limitations are stated plainly: one run per cell, no boundary hypothesis reaches a verdict at 15 runs per arm, and a script bug meant the ungated crossing rate for the file arms is unknown. The conclusion that survives is simple — a file tells an agent what you want; a gate decides what it gets.

Sources: arXiv:2611.27112 · HTML full text