Context Engineering for Claude 5: The New Rules for Building Effective AI Agents
Context engineering for Claude 5 — how to build AI agents the right way after Anthropic cut 80% of the system prompt without any loss in quality.

If your AI agent regularly produces strange outputs or "forgets" critical rules mid-session, the problem almost certainly isn't the model. The problem is how you're shaping its context. Context engineering for Claude 5 is no longer an optional topic for developers — it's a core competency for any executive who wants to build an AI system they can actually trust with a real business process: from invoice approvals to compliance monitoring.
Anthropic recently did something unexpected: when transitioning to Claude Opus 5 and Claude Fable 5, the company's engineers stripped more than 80% of Claude Code's system prompt — and registered zero degradation on their internal quality benchmarks. That single fact dismantles one of the most persistent beliefs in AI automation: that more instructions produce better agent behavior.
Why Prompt Engineering No Longer Saves You
Throughout 2023 and 2024, the "right prompt" was treated as the master key to everything. Companies hired prompt engineers who spent hours polishing instructions, layering in examples, constraints, and clarifications. The logic was simple: more rules, less unpredictability.
The problem is that logic stopped working once modern large models arrived. According to DataHub's State of Context Management Report 2026, 82% of technical leaders agree that prompt engineering alone is no longer sufficient to scale AI. That's hardly surprising: the classic approach was designed for one-shot queries, not for complex multi-step agentic workflows where the model makes dozens of sequential decisions.
Prompt engineering answers the question "what do I tell the model." Context engineering answers the question "what does the model already know when I tell it."
That's a fundamental distinction. AI researcher Andrej Karpathy described context engineering as "the subtle art and science of filling the context window with exactly the right information." In October 2025, Gartner stated plainly that AI leaders must "prioritize context over prompts," building architectures around dynamic data rather than static instructions.
The Three Context Layers People Forget
When you send a request to Claude, the prompt is just one small slice of what the model actually sees. The rest is assembled automatically:
- System prompt — defines the product environment and the role the model operates in
- CLAUDE.md and Skills — persistent files containing rules, procedures, and specifics about the repository or business process
- Memory — persistent storage that allows the agent to "remember" across sessions
- Tools — the set of functions the agent can call
The typical mistake: business agent owners try to pack everything into the system prompt, and end up with a bloated, contradictory document that's daunting even to read. Claude Opus 5 and Fable 5 don't need rigid guardrails in places where earlier models required them. When a more capable model encounters conflicting rules, it doesn't simply ignore one — it burns computational attention resolving the contradiction, and that directly impacts output quality.
Four Principles of Context Engineering for Business Agents
1. Principles Over Rules
The old approach: a detailed list of everything the agent must NOT do. "Don't edit files without confirmation. Don't send emails without approval. Don't modify budgets above X."
The new approach: articulate one principle that covers all of those cases at once. "Before executing an irreversible action — ask for confirmation."
One principle replaces five rules and scales better to situations you never anticipated. For a business agent handling purchase orders or compliance checks, this is especially critical — the real world always surfaces edge cases that weren't on the constraint list.
2. A File Tree Instead of One Document
Anthropic is explicit on this: rather than a single CLAUDE.md as "a centralized repository of everything," build a file tree where each file loads at the right moment.
In practice, it looks like this: a base file holds the agent's general description and critical gotchas. Separate files handle each module — one for processing invoices, one for escalations, one for reporting. The agent pulls in only the file it needs for the current task.
For an executive, this means not just better agent performance, but the ability to iterate individual parts of the system without risking a full breakdown. Updating approval logic doesn't touch month-end close logic. If you're interested in automating financial processes, there's more detail in AI Agents for Automating Month-End Close: Use Cases, Benefits, and Financial Risks.
3. Interface Design Instead of Examples
Prompt engineers used to pack system prompts with dozens of "query → response" examples to show the model how to behave. With Claude 5, that's mostly unnecessary — and expensive, in the most literal sense: every token in context costs money.
Instead, design your tools so the agent simply cannot misuse them. If a tool returns a structured JSON with clearly named fields, the agent needs no explanation of what to do with it. If a function is unambiguously named submit_for_approval, the agent understands its purpose without a single example.
As the Anthropic team puts it: if a human developer can't immediately tell which tool to use in a given situation, the agent won't do any better. Bloated tool sets with overlapping functions are one of the most common sources of failure in business agents.
4. Progressive Disclosure Instead of Front-Loading
Don't dump the entire context upfront. Give the agent information when it's actually needed.
This matters most for agents working with large data volumes: contracts, customer databases, email archives. Instead of loading everything into the starting context, use retrieval — semantic search that pulls only the relevant fragments immediately before they're needed. A 2025 study found that model accuracy drops by 24.2% when the required information is "buried" in a long context among irrelevant data — even when all the excess tokens are technically present. That's not an abstract number: for an agent processing hundreds of transactions daily, that error rate carries a direct dollar cost.
What This Looks Like in Practice: A Business Agent Architecture
Say a company is building an agent to support its procurement process: receiving requests, vetting suppliers, preparing documents, escalating exceptions.
Layer 1 — System Prompt. Short: who the agent is, what system it operates in, and its critical responsibilities. No examples, no long lists of prohibitions.
Layer 2 — Specialized Skills. A separate file for supplier verification logic. A separate file for approval rules by order value. A separate file for escalation templates. Each loads only when the agent enters the relevant step of the process.
Layer 3 — Memory. The agent saves the results of previous checks, the statuses of open requests, and notes on exceptions. After a restart, it reads its own notes and picks up where it left off. This is exactly how Anthropic describes agent behavior in long-horizon tasks: the ability to read one's own notes after a context reset is the foundational requirement for multi-hour autonomous workflows.
Layer 4 — A Minimal Tool Set. Not twenty functions for every conceivable scenario, but seven clearly scoped ones: supplier lookup, quote retrieval, budget check, document generation, submission for approval, logging, escalation. Each tool does one thing and returns only the information the agent needs for the next step.
An agent built this way doesn't need a human babysitting every order. It knows what to load and when — and asks for help only in genuinely ambiguous situations. For more on how this architecture holds up under load, see: Your AI Agent Infrastructure Will Fail. The Only Question Is When — and Whether You'll Recover in Time.
Mistakes That Break Agents in Enterprise Environments
Even with a solid grasp of the principles, companies keep stepping on the same landmines. Here are the most expensive ones.
Conflicting rules across layers. A classic scenario: the system prompt says "leave documentation where appropriate," but the CLAUDE.md file in the repository says "do NOT add comments." The agent navigates the conflict, but it burns attention doing so — attention that should have gone to the task. With Claude Opus 5 and Fable 5, this is especially sharp: a more capable model executes conflicting instructions more conscientiously — which means it ends up in illogical places with far more consistency than a weaker model would.
Stale context as the single source of truth. Some teams still keep all agent "memory" in a single CLAUDE.md file — an approach that was perfectly reasonable in 2024. Today, analysts examining the Claude 5 architecture call this a "cargo cult from a previous era": memory, artifacts, and specialized Skills now load and transfer between sessions natively, with no manual copying into one master file.
Tools that return too much data. If a call to get_contract_data returns 50 fields when the agent needs three, the other 47 are consuming context, reducing accuracy, and driving up costs. Tokens in context aren't free. For Claude Fable 5, the price is $10 per million input tokens. Architectural discipline here has a direct impact on OPEX.
Ignoring rubrics for quality control. Claude Code supports the concept of rubrics — dedicated reference documents that a verifier agent uses to evaluate another agent's output. For businesses, this means you can automatically check whether an agent's responses meet quality standards without involving a human reviewer — for instance, whether a drafted contract matches the company template, or whether a report satisfies board-level formatting requirements.
For more on measuring real-world autonomy before trusting an agent with critical processes: How to Measure the Real Autonomy of an AI Agent Before Trusting It with Business Processes.
How to Migrate to the New Architecture: A Step-by-Step Plan
Context engineering is not a one-time technical task for your developer. It's an operational discipline — one worth implementing systematically.
Step 1: Audit your current context. Collect all configuration files for your agents — system prompts, CLAUDE.md files, any instructions. Find duplicates and contradictions. The rule: if two directives can conflict, they will eventually conflict.
Step 2: Convert rules into principles. For every block of "don't do X, don't do Y, don't do Z," formulate one higher-level principle that covers all of them. Cutting system prompt length by 50–70% without quality loss is a realistic target.
Step 3: Decompose into Skills. Extract the parts of your logic that pertain to specific sub-processes. Each sub-process becomes its own file, loaded on demand.
Step 4: Audit your tools. For each tool, ask two questions: could the agent confuse it with another tool? Does it return more than the agent actually needs? If the answer to either is yes, the tool needs rework.
Step 5: Add memory for long-running tasks. If your agent manages processes that span more than one session, it needs a mechanism for writing interim results and reading them back after a restart. Without this, every session starts from zero — and you have an agent with amnesia.
Step 6: Build an eval loop. Every context change should run through your internal set of test cases. Anthropic's principle: "their evals are theirs; yours may differ." Don't accept changes based on general benchmarks alone — test on the real tasks your business actually runs.
Once this loop is in place, an executive gets what's most often missing in AI work: predictability. Not guesswork — genuine confidence that the agent will behave the same way on the next run. That sense of control over the system isn't illusory. It's structural.
FAQ
What is context engineering, and how does it differ from prompt engineering? Prompt engineering is about crafting the wording of a specific request to the model. Context engineering is the architecture of everything the model receives: the system prompt, memory, tools, loaded files, and the results of previous steps. Prompt engineering is a subset of context engineering — not the other way around.
Can you really remove 80% of the system prompt without losing quality? Anthropic did exactly that when transitioning Claude Code to Claude Opus 5 and Fable 5 in their own product. The key is that newer model generations understand principles far better and don't require an exhaustive rulebook for every possible scenario. That said — always validate on your own data.
How do I know if my agent has conflicting rules? The symptoms: the agent behaves inconsistently in similar situations, deliberates too long before standard decisions, or occasionally ignores a rule it followed an hour ago. The systemic fix: walk through every configuration layer and explicitly document which rule takes precedence when there's a conflict.
What are Skills in the context of Claude 5, and how do I use them? Skills are separate instruction files for specific sub-tasks, loaded dynamically. Unlike CLAUDE.md — which is always present in the context — a Skill activates only when the agent is performing the relevant action. This keeps the base context lean while making specialized procedures available on demand.
How do rubrics help in business agents? A rubric is a reference document describing the criteria for a quality result (for example, "what a good supply contract looks like"). A verifier agent receives the rubric and evaluates the primary agent's output against those criteria. This lets you automate quality control without pulling in a human reviewer for every output.
Do I need a CTO to implement context engineering? For the basics — no. Auditing prompts, reworking rules, and decomposing logic into files is work an operations manager can lead with a foundational understanding of how AI agents work. For complex architectures with custom tools and RAG pipelines — yes, you'll need technical depth or outside expertise.
The fundamental shift this article describes didn't happen overnight, and it wasn't announced as a flashy new feature — it's embedded in how Anthropic itself builds its own products. Cutting a system prompt by 80% with no quality loss isn't a marketing claim. It's an architectural thesis: more capable models need trust and structure, not a cage made of rules.
For business, this translates into a practical opportunity. Agents built on context engineering principles turn out to be cheaper to operate, more reliable under load, and simpler to maintain. Companies that rebuild their AI infrastructure to these standards first won't just gain a technical edge — they'll gain operational predictability. That's hard to describe in words but immediately obvious in practice: when a system consistently does what you expect it to do, the executive running it stops thinking about the system and starts thinking about growth.
Boards and investors are increasingly evaluating not just an AI strategy on paper, but the real maturity of operational implementation. A CEO who can show "here is the architecture, here is the eval loop, here are the reliability metrics" looks entirely different in those conversations than one who still leads with screenshots of prompts.
Which specific process in your company would you want to test these principles on first? Leave a comment below or reach out directly — we'll work through your situation together.
Have questions? Ask the AI agent right now
Responds in seconds, knows everything about our services and will help with your situation
You might also like
Your AI Agent Infrastructure Will Fail. The Only Question Is When — and Whether You'll Recover in Time
How to build resilient AI agent infrastructure: a step-by-step guide for CEOs and COOs, with real-world examples and tools.
Technical GuidesMinecraft Moves to SDL3: Why Platform Standardization Accelerates AI Agent Development
Minecraft is migrating to SDL3 — and this is about far more than gaming. We break down how platform standardization is reshaping the speed of AI agent deployment in business.
Technical GuidesParallel Programming for Agents: How to Run Dozens of Tasks Simultaneously Without Chaos
Parallel programming for AI agents: a step-by-step guide for business. How to run dozens of tasks simultaneously, avoid chaos, and increase productivity.
