Agent Context Files (CLAUDE.md / AGENTS.md)

Project-level markdown files read by coding agents at session start that carry persistent context: architecture, conventions, constraints, and team intent.

Also known as: CLAUDE.md, claude.md, AGENTS.md, agents.md, AGENT.md / INFO.md, AGENT.md, AGENTS.md (as intent ledger, not config), context files, folder = agent, workspace, Cursor rules, program MD

Part of: Agent Harness

Agent Config Decay

How authors use it

Oldest first (extraction date when no publication date is known).

AuthorTheir termTheir meaning
Claude Code: Best practices for agentic coding
anthropic.com · 2025-04-18
CLAUDE.mdA special markdown file Claude Code automatically pulls into context at the start of a conversation, holding persistent project context (bash commands, core files, code style, testing instructions, repo etiquette, environment setup, warnings); placeable at repo root, parent dirs, child dirs, or home folder, and meant to be treated and iterated on like a prompt
Skill Issue: Andrej Karpathy on Code Agents, AutoResearch, and the Loopy Era of AI
No Priors: AI, Machine Learning, Tech, & Startups · 2026-03-20
program MDMarkdown instruction files that describe how an auto researcher or agent should operate — essentially the 'source code' of a research organization
Anatomy of a perfect Openclaw setup
Corey Ganim · 2026-04-10
AGENTS.mdThe primary configuration file loaded into the system prompt at session start; defines the agent's operating directives, rules, and tool usage conventions.
Anatomy of a perfect Openclaw setup
Corey Ganim · 2026-04-10
workspaceThe user's local configuration folder (e.g. ~/clawd/) containing all customization files, skills, memory, and secrets.
Alex Wang's Post
Alex Wang · 2026-04-16
CLAUDE.mdA project-level context file read by Claude Code on startup; should contain stable context (architecture, conventions) rather than procedural instructions
Charlie Hills 🦩's Post
Charlie Hills 🦩 · 2026-04-16
CLAUDE.mdA project-level configuration file that sets persistent rules and context for every Claude Code session
Jacob Langvad Nilsson's Post
Jacob Langvad Nilsson · 2026-04-20
folder = agentThe mental model that an AI agent is simply a folder with a CLAUDE.md file — no deployment infrastructure needed
The Founder's Playbook: Building An AI-Native Startup
Claude (Anthropic) · 2026-05-05
CLAUDE.mdA project-level markdown file read automatically by the Claude Code agent SDK; functions as 'persistent memory' for the codebase, encoding architectural decisions, constraints, and patterns across sessions.
This week on How I AI: The internal AI tool that's transforming how Stripe designs products (Protodash at Stripe)
Lenny's Newsletter / Owen Williams · 2026-05-09
Cursor rulesInstruction files that teach the AI code editor how to use a specific project — which components to use, when to check the MCP server, how to handle the design system. The foundational layer of Protodash.
JobRunr Introduces ClawRunr, an Open-Source Java AI Agent
Diogo Carleto · 2026-05-18
AGENT.md / INFO.mdWorkspace files used to compose the agent's system prompt at runtime: AGENT.md for instructions, INFO.md for environment context
The Intent Debt
Addy Osmani (addyosmani.com) · 2026-06-06
AGENTS.md (as intent ledger, not config)A file that describes what the TEAM means — conventions, 'we don't do it this way because…', constraints invisible in any single file — as opposed to /init-style auto-generated files that describe what the code IS. The distinction is what makes the artifact useful to agents.

Documents (27)

Propositions touching this concept (62)

By publication month, oldest first (extraction month when no publication date is known).

2025-01

2025-04

2025-06

2025-10

2026-01

2026-02

2026-04

2026-05

2026-06

2026-07

2026-08

2026-09

2026-10

Tensions

Can harness engineering actually solve the AI code quality problem?
from: What is the right approach to building harnesses around AI coding agents, and where are the limits?
Assessment: This is the central divergence in the literature. Osmani is most optimistic, operating from benchmark evidence that harness changes produce dramatic improvements on coding tasks. Böckeler occupies the middle ground, distinguishing solvable from unsolved harness domains. Beck is most skeptical, questioning whether harnesses address the root cause at all. The disagreement is partly empirical (what do the benchmarks actually measure?) and partly about scope (Osmani focuses on task completion; Beck focuses on long-term code value including flexibility). They may not be contradicting each other so much as talking about different time horizons: harnesses help with immediate task success, but the tarpit emerges over accumulated changes.
What is the right metaphor for the human-AI relationship in coding?
from: What is the right approach to building harnesses around AI coding agents, and where are the limits?
Assessment: These metaphors are not mutually exclusive but they lead to different design decisions. Garg's teammate metaphor emphasizes collaboration rituals and may underplay the need for hard constraints (you don't sandbox a teammate). Böckeler's governor metaphor is the most theoretically rigorous but may overclaim the applicability of control theory to creative work. Osmani's engineering metaphor is the most actionable but may miss the social and organizational dimensions. Thoughtworks' organizational metaphor captures the broadest scope but is the hardest to operationalize.
Will better models make current harness practices obsolete?
from: What is the right approach to building harnesses around AI coding agents, and where are the limits?
Assessment: Osmani makes the strongest case for permanence with concrete evidence of scaffolding migration. Beck keeps the door open for the Bitter Lesson hypothesis. The truth likely depends on the type of harness: mechanical safeguards (sandboxes, permission controls) may always be needed, while knowledge-transfer patterns (AGENTS.md, priming docs) may become less necessary as models improve at in-context learning.
Is the model a swappable, commoditized component (so selection is a cost decision), or is model choice load-bearing (so selection is a capability decision)?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: Both camps are right about different task strata, and the tie is broken by the routing camp's own artifact. Commoditization holds on the bulk/background tier (musistudio and the Pragmatic Engineer are correct that a cheap or open model suffices for a large share of tokens), but model choice is load-bearing exactly on the hard tier — the 'hardest 40%' the routing camp routes AWAY (the Pragmatic Engineer's own gap notes 60%-of-token-spend is not 60%-of-value). nrehiew's 6.5x over-editing spread and stellaraccident's collapse are measured on precisely that hard tier. The clincher the swap camp does not concede: musistudio's OWN per-model transformers (tooluse, enhancetool, reasoning, deepseek, gemini) prove the harness is NOT model-agnostic — every model needs bespoke request/response rewriting just to work behind Claude Code, so the 'any model' artifact self-refutes. Delangue even concedes the frontier gap himself. Verdict: select cheap-and-swappable for bulk, and treat the model as a load-bearing capability decision for the hardest slice — the two positions are not competitors but a partition of the task distribution.
Context size: should you shrink the problem to fit a small usable window (decompose / reset), or grow and trust a large window?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: The apparent 'grow / trust the big window' position for CODING largely dissolves once retrieval is separated from coding — which is exactly Pocock's move ('good for retrieval, less good for coding') and musistudio's (longContext is a routed escalation, not the coding default). No text argues you should code inside a full 1M window. The only genuine pressure toward trusting a bigger window is the vendor-forward Fable 5 / Opus 4.6 claim that coherence loss is being engineered away — but that is a moving target (convergence 5), not a stable dial, and even the harness paper only relaxed context resets AFTER measuring that the new model no longer needed them. A secondary, live sub-dispute survives: reset vs compact. Pocock, the harness paper and best-practices favor clearing/resetting to a fresh agent; Hills and Osmani lean on compaction. The reset camp has the better argument on today's models — compaction preserves the same anxious agent — but the disagreement is real and unresolved. Verdict: shrink-and-decompose is the default for coding; grow only as an explicit retrieval escalation; prefer reset over compact unless the model version has demonstrably killed context anxiety.
Effort/reasoning: does more thinking make output better, or does more reasoning make it worse (over-engineering / over-editing)?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: This looks like a head-on collision but is really the corpus resolving a category error, so I keep it as a divergence-under-adjudication rather than a live two-camp fight. The two things bundled into one 'effort' dial are separable: reasoning DEPTH (deliberation and research before acting — what stellaraccident measures as the Read:Edit ratio) versus action SCOPE (how much the model rewrites — what nrehiew measures as over-editing). They are separable but DEFAULT-COUPLED: more reasoning, unconstrained, tends to produce more scope. nrehiew is the empirical bridge — constrained reasoning models are the MOST faithful, proving depth and tight scope combine positively when you address them separately. Fable 5 already acts on this, pairing 'reduce effort' with a distinct anti-over-engineering instruction. The actionable verdict: do NOT cut reasoning depth to fix over-editing (that is stellaraccident's exact grievance and it backfires into shallow, edit-first behavior); keep the depth and add an explicit scope constraint. The failure is treating one knob as if it controls both correctness-depth and edit-scope.
Who selects the model/effort/context — a human deciding per task, or an automatic router — and who is trusted to hold the dial?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: The human-vs-auto axis is less about capability than about (a) whether task difficulty can be detected a priori and (b) who bears the principal-agent risk. No router in the corpus actually measures difficulty — musistudio routes by token-count and static scenario, and the Pragmatic Engineer's routers infer 'good enough' without a demonstrated oracle — so 'auto' today means 'static-heuristic', not 'optimal'. Automation is safe when the user owns the policy (musistudio) and dangerous when the router profits from the choice (Cursor Auto) or when the provider adjusts the dial invisibly (stellaraccident). Verdict: keep the human holding the difficulty judgment and the effort dial until routers can both measure adequacy and prove neutral incentives; automate only the mechanical dispatch, over rules you own and can audit.

Open gaps (63)