{
  "id": 7962954,
  "title": "The 300-line instruction budget: what actually fits in your agent config",
  "url": "https://urgent.news/2026/09/17/the-300-line-instruction-budget-what-actually-fits-in-your-agent",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-17T06:01:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/piekwerk/the-300-line-instruction-budget-what-actually-fits-in-your-agent-config-34gk"
  },
  "original_language": "en",
  "account": "Developers' instructions for CLAUDE.md can range from 40 to 900 lines, but the key question should be about what the model actually follows past line N. To understand this, two factors limit the effectiveness of lengthy instruction files. One is selective attention; as the number of instructions increases, the model's ability to follow them declines irregularly, with rules near the start and end being more reliably followed than those in the middle. The second factor is token spend per request; an exhaustive CLAUDE.md could consume a significant portion of the model's context window, potentially crowding out actual code and conversation.\n\nThe recommended limit for always-on instructions is around 300 lines, which translates to approximately 2,400 tokens. This budget leaves ample room for code and conversation within a typical session while maintaining manageable cognitive load. It's more crucial to have a set limit rather than an exact number of lines. Exceeding this budget doesn't indicate a problem with the config but rather a need for better scoping of rules.\n\nEssential components of the always-on config should include: project identity (10-20 lines), hard commands (15-25 lines), non-negotiable rules (10-15 lines), an architecture map (30-50 lines), conventions (40-60 lines), workflow rules (20-30 lines), imports/pointers (10-20 lines), and on-demand docs (10-50 lines). Anything that is file-scoped should be moved out of the always-on config into glob-scoped rules to prevent unnecessary loading of rules for irrelevant files.\n\nTo enforce the budget, a simple bash script can be used to check the line count of the AGENTS.md and CLAUDE.md files. If the total exceeds the 300-line limit, the script will alert the team to either cut or scope the rules. Implementing this check ensures that the config stays within the intended budget, preventing it from growing out of control during high-pressure situations.",
  "summary": "Ask five developers what belongs in a CLAUDE.md and you will get five files between 40 and 900 lines. The useful question is not \"what can I put in\" but \"what does the model actually follow past line N\". This article is the working answer we use: a hard ceiling around 300 lines of always-on instructions, and a budget for how to spend them. Why a ceiling exists Two mechanisms work against long…",
  "key_points": [
    "Developers' instructions for CLAUDE.md range from 40 to 900 lines",
    "Selective attention limits effectiveness of lengthy instruction files",
    "Recommended limit for always-on instructions is around 300 lines"
  ],
  "editors_take": "Setting a 300-line instruction budget for always-on config helps developers balance rule scope with model performance, ensuring sufficient context for code and conversation while maintaining a manageable cognitive load.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}