On-screen text
BẠN VIẾT FILE NÀY THẬT KỲ
~/your-repo/
CLAUDE.md
BẠN VIẾT CLAUDE
@ainius.net
01/13
Do Context Files Help Coding Agents?
A Two-Agent Ablation Study on Real Repositories
Abstract
Persistent context files (AGENTS.md, CLAUDE.md) are standard practice for guid-
ing AI coding agents, yet evidence for their
effectiveness is contradictory. We present
a controlled ablation of context-injection
strategy across two frontier agents (Claude
Code and Codex), 17 real tasks from 3
repositories (15 shared + 2 Codex-only), and
288 evaluated runs with gold-test evalua-
tion. Context strategy does not measurably
move correctness on either agent (bounded
to ≤10-15pp via equivalence testing).
A failure-mode triage reveals why: agents fail
on implementation skill-feature design,
pattern selection, exact wiring-not missing
repository knowledge that a context file could
supply; a manipulation probe confirms the
real AGENTS.md never converts a near-miss
to a pass on either agent. We further show
that borderline task difficulty is agent-specific
(Spearman p=0.75), offering a candidate
explanation for prior contradictions: single-
agent studies draw tasks from different agents'
informative bands. We release all code, data,
and analysis.
1 Introduction
Repository context files-AGENTS.md,
CLAUDE.md, and similar project-level guides-
have become ubiquitous infrastructure for AI
coding agents. Platforms like Claude Code auto-
load these files into every session; practitioners
Invest significant effort authoring coding con-
ventions, architectural constraints, and workflow
guidance, expecting agents to produce better code
as a result.
Yet empirical evidence is contradictory. Lulla
et al. (2026) report that AGENTS.md files im-
prove agent efficiency (lower wall-clock runtime
and fewer output tokens), while Gloaguen et al.
(2026) find no significant effect on task comple-
tion when context files are present versus absent.
The two studies differ in agent (Codex-family,
Claude-family), evaluation method, and experi-
mental control-making reconciliation impossible
without a study that varies injection strategy under
controlled conditions across both agent families.
This paper presents such a study. We conduct
a controlled ablation of context-injection strategy
on real merged pull requests, evaluated with gold-
ten gold tests (SWE-bench Tier-C style), across
two frontier agents from different providers. Of-
three strategies-NONE (no context), ALWAYS_ON
(full AGENTS.md in every system prompt), and
SELECTIVE (topic-organized wiki files the agent
retrieves on demand)-vary primarily how context
is delivered (see $3.3 for a caveat on the SELEC-
TIVE corpus).
Our contributions are:
1. A controlled, two-agent ablation (288 eval-
uated runs: 15 Claude tasks + 17 Codex
tasks, each x 3 strategies x 3 repeats) with
SWE-bench-style gold-test evaluation on
repositories, yielding a bounded null: the
correctness effect is ≤10pp (Claude)/≤15pp
(Codex).
2. A failure-mode triage and manipulation
probe demonstrating that real tasks fail on
implementation skill, not missing reposi-
tory knowledge-the mechanism behind the
null-and that the real AGENTS.md cannot
convert a near-miss failure to a pass on either
agent.
3. Evidence that borderline task difficulty is
agent-specific: the same task may be trivially
solvable for one agent yet challenging
another, explaining why single-agent studies
reach contradictory conclusions.
Bạn viết CLAUDE
.md thật kỳ.
Nhưng nó
có thật sự giúp AI code đúng hơn không?
288 lượt chạy do thử
code đúng hơn không?
đang cuối tháng 7
đo đúng câu hỏi
đó, Tác
giả cho hai agent
làm việc đầu tiên
Claude
Claude và Codex,
viết xong một tầng
tối ưu, rồi
cài luôn vào đó một
lỗi sai. Bài
cần chủ động làm
mới mã xác thực,
agent lại chọn
thử lại sau khi lỗi.
Chặn tham số V2
Biết luật nhưng dấu dây kiểm tra sai
chỗ.
Làm mới token
Cần chủ động, agent chọn thử lại sau
lỗi.
Thu hẹp kiểu
Cần suy lặp sườn về hệ kiểu dữ liệu
Phép thử ngược
Ở thí nghiệm với file thật
36
Số lần một ca đang
hỏng được lật thành
đạt: không
một lần nào. Còn
Vì sao họ đá nhau
vì sao hai nghiên
cứu trước đá nhau?
Tương quan độ khó 0.75
Cao, nhưng không hề trùng khớp
Khoảng 40%
tác vụ lệch vùng
Nhạy với agent này, quá dễ hoặc khó với agent kia
Hệ quả cho người làm nghiên cứu
Chọn tác vụ theo 1 agent thì agent kia không lộ khác biệt
nhưng quá dễ
hoặc quá khó
với agent kia.
Chưa đo thấy, không phải
chắc chắn không có
là chỗ tử tế nhất
của bài báo. Chính
tác giả nói nghiên
cứu này quá nhỏ.
Với 17
tác vụ, kể khoảng 120 đến 200 để đủ mạnh
Khác biệt 30 điểm phần trăm chỉ bị bắt 57% số
lần
được 57 phần
trăm số lần.
Muốn kết luận chắc
chắn ở mức 10 điểm,
cần khoảng 120 đến
200 tác vụ. Vậy
Số lần chạy mù cả bộ test
ngữ cảnh có đổi
được gì không? Có
một thứ. Ở
kho code duy nhất
có file cảnh báo
rằng bộ test
chạy hơn 20
phút,
số lần agent chạy
giảm đều: 3.67,
rồi 2.44,
rồi 1.67.
Tác giả xếp
thăm dò, chưa
đủ mạnh về thống kê.
Nó không làm
agent code đúng
hơn, chỉ làm
agent làm gọn
hơn. Vậy
nên viết gì vào
Đầu TƯ VÀO ĐẦU
Lệnh chạy và cảnh báo,
không phải giải thích dài
Tài liệu Claude Code khuyến ưu tiên lệnh build, cách
chạy test, các quirk của môi trường. Lỗi thiết kế thì
tài liệu không sửa được.
Đúng loại cảnh
báo vừa giúp agent
tiết kiệm công sức.
Còn lỗi thiết kế
thì không tài liệu
nào sửa thay bạn
được. Thử
mở file CLAUDE.md
của bạn dài
bao nhiêu dòng?
Biến mọi nội dung thành video trong vài
phút.
Link, chủ đề, file hay video - ainius dụng video cho bạn.
Bắt đầu miễn phí tại ainius.net
ainius.net
Mở ra kiểm tra rồi thả con số vào comment
Nếu quá nửa là kiến thức
của bạn đang tối ưu
nhầm chỗ.
File của bạn dài
bao nhiêu dòng?