{"slug": "how-to-8x-your-code-output-using-context-engineering", "title": "How to 8x Your Code Output Using Context Engineering", "summary": "Anthropic reported in June 2026 that its typical engineer was merging 8 times as much code per day in Q2 2026 as in 2024, attributing the gain to 'context engineering' rather than model or team changes. The practice, defined by Anthropic's Applied AI team in September 2025, focuses on finding the smallest set of high-signal tokens to fit a model's finite attention budget, with the article emphasizing that loading more context degrades agent performance and that effective context engineering is about editing, not collecting.", "body_md": "# Anthropic’s Engineers 8x Their Output\n\nIn June 2026 Anthropic published a report on its own engineering organisation called *“*, and the headline finding travelled a great deal further than the document did.\n\n[When AI Builds Itself](https://medium.com/@marc.bara.iniesta/anthropics-8x-coding-gains-are-a-case-study-in-amdahl-s-law-29cdc2fe4c1b)”\n\nBy the second quarter of the year, the typical Anthropic engineer was **merging 8 times as much code per day as in 2024.**\n\nBut the explanation was mostly **misread**.\n\nThe [foundational model did not change](https://www.the-ai-corner.com/p/claude-opus-5-playbook-benchmarks-pricing-effort-dial-2026). The team did not change. The [face behind the company](https://www.the-ai-corner.com/p/daniela-amodei-anthropic) didn’t change. It all came down to *“context engineering”.*\n\nThat version sends people off to build enormous scaffolding that makes their agents slower and less reliable. Almost everything that genuinely works here is smaller and duller than the posts suggest, and most of it sits in documentation nobody reads.\n\nSo what follows is the version I would hand a friend who asked me to set this up on their repo over a weekend.\n\nWhat context engineering means, which files load at which moment, and which parts of it are worth your Saturday.\n\n*together with TrueForge:*\n\nEverything below is context engineering for your sessions.\n\nTrueForge is the same discipline built into an\n\n[agent harness]: open source, vendor-neutral, benchmarked against Claude Managed Agents on the same model and tools\n\n▫️ Same score (11/14), ** 62% fewer tokens**, 30% lower cost per run\n\n▫️ [Compaction](https://www.truefoundry.com/trueforge) instead of replaying, the discipline this article teaches\n\n▫️ Any model, any MCP server: **$0.25 vs $1.10** per correct answer on the open-model config:\n\n**Table of Contents**\n\n1. Context Engineering Is Budgeting, Not Collecting\n\n2. The Four Layers and When Each One Loads\n\n3. Writing an Instructions File Claude Will Follow\n\n4. The Memory Layer, and What Survives a Compaction\n\n5. Fetching Context Instead of Front-Loading It\n\n6. Turning All of This Into Actual Output\n\n**1. Context Engineering Is Budgeting, Not Collecting**\n\nThe name makes it sound like the job is **gathering everything relevant** and handing it over. The job is closer to the **opposite**.\n\n**A definition worth actually using**\n\n[Anthropic’s Applied AI team published a piece on this in September 2025](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents), and the premise is the part worth keeping.\n\nA model works inside a **finite attention budget**, and every token you put in front of it spends from that budget whether it earned its place or not.\n\nGood context engineering, by their definition, means **finding the smallest set of high-signal tokens that make your desired outcome likely**.\n\nIn other words, **editing rather than collecting.**\n\nPrompt engineering was about how you worded one message. This is about what the model can see across an entire task, and most of the craft turns out to be about what you leave out.\n\n**Why loading more makes agents worse**\n\nYou can watch this happen in a long session. Quality drops well before you hit any hard limit, and once compaction fires near the ceiling your history gets rewritten into a summary that keeps whatever the summariser thought mattered.\n\nThe costs add up fast. Every MCP server you connect spends tokens on tool definitions before you have typed a character, and a 400-line instructions file does not get followed twice as reliably as a 200-line one. Anthropic’s documentation says the reverse happens.\n\nSo before you add anything, work out whether it needs to sit there for the whole session. Useful is not the bar.\n\n**2. The Four Layers and When Each One Loads**\n\nMost people organise context by topic. Sorting it by **load time** tells you far more, because when something arrives decides whether it will still be there an hour later.\n\n```\nENFORCED      settings and hooks            always, and not context at all\nRESIDENT      CLAUDE.md, rules, MEMORY.md   from disk, every session start\nCONDITIONAL   path-scoped rules             when a matching file is opened\nFETCHED       skills, sub-agents, MCP       only when something asks for it\n```\n\n**The two layers that are always there**\n\nThe enforced layer barely counts as context, which is exactly why it goes first. A deny list in your settings file blocks tools, commands or paths and the client honours it whatever the model concludes, while hooks run as shell scripts at fixed lifecycle points and can stop an action outright.\n\nThis is where a never-touch list belongs. Writing **never read .env** into a markdown file buys you a strong hint and nothing more, because the documentation is explicit that instructions are context and not enforced configuration.\n\nThe resident layer is your **CLAUDE.md files**, any rules without path scoping, and the top of Claude’s own memory index. All of it comes off disk at the start of every session, and all of it costs you window space for the entire run.\n\n#### WHERE CLAUDE.MD FILES LIVE\n\n```\n  managed policy   /Library/Application Support/ClaudeCode/CLAUDE.md\n  user             ~/.claude/CLAUDE.md\n  project          ./CLAUDE.md   or   ./.claude/CLAUDE.md\n  local            ./CLAUDE.local.md        (gitignore this one)\n```\n\nFiles above your working directory load in full at launch, concatenated from the filesystem root downward, so whatever sits closest to where you started gets read last. In a monorepo where other teams’ files keep getting swept in, claudeMdExcludes drops them by glob.\n\n**The two layers that come and go**\n\nA rule carrying paths frontmatter costs you nothing until Claude opens a file that matches the pattern.\n\n**Nested** CLAUDE.md files in subdirectories behave the same way, which makes both of them a **good home for API conventions** you do not want resident while working on the frontend.\n\nThe **fetched** **layer** is everything Claude goes out and **retrieves**. [Claude skills load](https://www.the-ai-corner.com/p/claude-skills-complete-guide-2026) when you invoke one or when Claude judges it relevant, sub-agents hand back results from a separate window, and MCP calls pull in the ticket or the incident or the schema.\n\nWorking out which layer something belongs to answers most of the questions people ask about this, including the one where an instruction seems to disappear halfway through a task.\n\n**3. Writing an Instructions File Claude Will Follow**\n\nEveryone starts here, and almost everyone writes too much.\n\n**Name it CLAUDE.md, then check it loaded**\n\nClaude Code reads CLAUDE.md. It does not read AGENTS.md, and no fallback exists, so a repository holding only an AGENTS.md hands Claude nothing at all.\n\nA lot of guides get this backwards, and it matters because AGENTS.md is a real convention that most other coding agents do look for. Running a mixed toolchain, put a single @AGENTS.md import at the top of your CLAUDE.md, or symlink one to the other and move on.\n\nThen confirm it worked. Run **/context** and look for the file under memory files, because skipping that check is how people spend a fortnight convinced their instructions are being ignored.\n\nStart with **/init**, which reads your codebase and drafts something for you. Then cut it hard, since what it produces is a description of your repo and what you need is a set of corrections to it.\n\n**Stay under 200 lines, and know what to cut**\n\nThe documentation targets under 200 lines per file and says plainly that longer ones eat more context and get followed less often. Treat the file as a budget line with a hard ceiling rather than a wiki page.\n\nThe /doctor checkup proposes trims along a principle worth stealing outright. It strips anything Claude can work out by reading the repo and keeps the pitfalls, the reasoning, and any convention that contradicts what your tools do by default.\n\n#### WORTH THE SPACE\n\nbuild, test and lint commands\n\nconventions that contradict the framework default\n\nwhere things live when the folder tree does not say\n\nthe failure that already cost somebody an afternoon\n\nwhat to do when a requirement is ambiguous\n\n#### NOT WORTH THE SPACE\n\ndirectory listings\n\ndependency lists\n\narchitecture overviews\n\nanything Claude can read off the repo in 10 seconds\n\nWrite rules you could check against. **Use 2-space indentation** works, while **format code properly** does nothing at all. Anywhere two rules contradict each other across the tree, Claude may pick one arbitrarily, so a periodic read-through pays for itself.\n\nAdd to the file on a trigger rather than on a schedule. Claude repeats a mistake, a review catches something it should have known, or you notice yourself retyping a correction you already typed last week.\n\n**4. The Memory Layer, and What Survives a Compaction**\n\nMost playbooks tell you to **hand-build a memory file** that the agent reads at the start of a session and updates at the end. That feature already ships, switched on.\n\n**Claude keeps its own notes now**\n\nAuto memory is enabled by **default** and Claude decides what to keep based on whether it would help a future conversation.\n\nSo you should build **commands** it worked out the hard way, a **debugging pattern** that keeps recurring, a **preference** you corrected twice, the reason a particular test stays skipped.\n\n```\n~/.claude/projects/<project>/memory/\n  MEMORY.md            index, first 200 lines load every session\n  debugging.md         read on demand\n  api-conventions.md   read on demand\n```\n\nOnly the index loads at startup, capped at the first 200 lines or 25KB, whichever arrives first. Everything past that gets dropped without warning, which is why Claude keeps pushing detail out into topic files and reading them when needed.\n\nOpen it now and then with /memory. It is plain markdown you can edit or delete, and a stale note does more damage than a missing one because Claude will act on it with total confidence.\n\nTwo limits are worth knowing. Auto memory lives on one machine and is shared across worktrees of the same repository, and sub-agents do not inherit what the main conversation learned.\n\n**Placement decides what comes back**\n\nCompaction fires as you approach the ceiling, summarises your conversation, and hands the model a compressed version of its own history. What makes it through follows one rule that is simple and not at all obvious.\n\n```\nSURVIVES     project-root CLAUDE.md, unscoped rules, MEMORY.md index\nSUMMARISED   path-scoped rules, nested CLAUDE.md, everything you typed\n```\n\nAnything read off disk at startup gets re-injected afterwards. Anything that arrived through the conversation gets folded into a summary and stays folded.\n\nA path-scoped rule therefore vanishes at compaction and will not return until Claude opens a matching file again. Where an instruction has to hold for a whole task, put it unscoped in the project root and stop repeating yourself in chat.\n\nTwo commands do most of the day-to-day work. Use /clear between unrelated tasks, which hardly anyone does often enough, and /compact followed by an instruction when you want to choose what gets preserved.\n\n**5. Fetching Context Instead of Front-Loading It**\n\nOnce you stop trying to preload everything, the interesting question becomes how Claude gets what it needs at the moment it needs it.\n\n**Skills carry procedures, sub-agents carry volume**\n\nRules load every session or whenever a matching file opens, while skills load **only** when you invoke one or when Claude decides one applies.\n\nA fact Claude should always hold belongs in a rule, and a procedure it should sometimes follow belongs in a skill.\n\nSub-agents are the strongest move available here and the one hardly anybody uses. A sub-agent explores inside its own clean window and returns a condensed summary, often 1,000 to 2,000 tokens, so your main session never sees the 80,000 tokens of search output behind the answer.\n\nWorth saying plainly though. A simple loop often beats an elaborate multi-agent arrangement, so reach for this when the reading volume justifies it and not because the architecture diagram looks impressive.\n\n**External systems, and what they quietly cost**\n\nMCP is how Claude reaches the ticket explaining why a feature matters, the incident showing how users are hitting a bug, and the schema the fix has to respect. That context is real, and it is frequently the piece that was missing.\n\nThe cost stays hidden until you look for it. Every connected server spends startup budget on tool definitions before you type anything, so a dozen connectors you rarely touch is a tax you pay on every single session.\n\nWhere the two overlap, there is a decent argument for skills over servers. You can read a skill and see exactly what it instructs Claude to do, whereas a server is a black box you have granted tool access to.\n\n**6. Turning All of This Into Actual Output**\n\nAt the end of the day, code still has to be **written**.\n\nContext work stops an agent making **confident bad decisions**, and by itself it produces nothing extra at all. The 8x came from somewhere else.\n\n[Anthropic’s engineers stopped typing code](https://www.the-ai-corner.com/p/claude-code-dynamic-workflows-6-patterns-14-steps-anthropic-engineers-2026) and started **directing and reviewing it**.\n\nThe workflow the company recommends runs like this:\n\nExplore → Plan → Code → Commit\n\nThe first two are the steps people **skip** on their way to a fast wrong answer.\n\n[Plan mode](https://code.claude.com/docs/en/common-workflows) helps because it makes exploration read-only by construction instead of by request.\n\nThen **verify**, which is where their guidance spends most of its attention.\n\nAn agent that can run your tests and read a real stack trace goes and fixes its own bugs, while an agent handed **tests failed** starts guessing, and guessing quickly is not productivity.\n\nTheir own security team reports that tracing control flow during an incident used to take 10 to 15 minutes and now takes **roughly a third of that**, because Claude could run things and read output instead of reasoning about code it had no way to execute.\n\n**So don’t focus on the headline.**\n\nAnthropic calls 8x almost certainly an overstatement of the true gain, cites outside research showing developers overestimate how much AI speeds them up, and when it polled 130 of its own research staff the median answer landed nearer 4 times.\n\n### What a weekend actually looks like\n\nSet a **deny list** and one hook for whatever would ruin your week.\n\nRun **/init** and then cut the result in half.\n\nMake your **test suite runnable** in one command with failures a machine can read.\n\nThen **hand over a real ticket** instead of a toy one, and watch what comes back.\n\nAfter that it is **maintenance**.\n\nYou add a line when Claude repeats a mistake, delete a line when /doctor tells you it was derivable anyway, and keep the resident layer small enough that the model still has room to think.\n\nThe takeaway is that you **don’t have to learn to describe** what you want more precisely. You have to **find the work you are willing to stop doing**, then build enough checking that allows you to sleep comfortable at night.", "url": "https://wpnews.pro/news/how-to-8x-your-code-output-using-context-engineering", "canonical_source": "https://www.the-ai-corner.com/p/context-engineering-claude-code-playbook", "published_at": "2026-08-20 14:47:41+00:00", "updated_at": "2026-08-20 15:15:09.950507+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "developer-tools"], "entities": ["Anthropic", "TrueForge", "Claude"], "alternates": {"html": "https://wpnews.pro/news/how-to-8x-your-code-output-using-context-engineering", "markdown": "https://wpnews.pro/news/how-to-8x-your-code-output-using-context-engineering.md", "text": "https://wpnews.pro/news/how-to-8x-your-code-output-using-context-engineering.txt", "jsonld": "https://wpnews.pro/news/how-to-8x-your-code-output-using-context-engineering.jsonld"}}