In June 2025, Shopify CEO Tobi Lutke tweeted something that kicked off a terminology war: "Context engineering is the new prompt engineering." Andrej Karpathy agreed, calling it "the delicate art and science of filling the context window with just the right information for the next step."

Within months, Anthropic published a detailed engineering guide on context engineering for AI agents. LangChain, Cognition, and Google DeepMind followed. Job postings with "context engineer" in the title started appearing on LinkedIn. A whole discipline was being named in real time.

Here is the problem. Most people think context engineering is just prompt engineering rebranded. It is not. The difference is structural, not semantic. Understanding that difference determines whether your AI systems work in production or only work in demos.

What Prompt Engineering Actually Does

Prompt engineering asks one question: "What text should I put in my message to get the output I want?"

That question matters. The right phrasing, the right examples, the right structure in the instruction itself all affect output quality. Chain-of-thought prompting, few-shot learning, role specification, and output format constraints are all prompt engineering techniques. They work.

But prompt engineering operates at the message level. It assumes the information surrounding the message is already correct and complete. A prompt engineer might iterate on "Summarize this document concisely" versus "Provide a 3-sentence summary focusing on actionable insights." Both are fine. Neither will save you if the document is 40 pages when only the first three matter, or if the model has already accumulated 50,000 tokens of irrelevant conversation history.

What Context Engineering Actually Does

Context engineering asks a different question: "What information architecture should surround this model invocation to make reliable, high-quality reasoning possible?"

The scope shift is massive. Context engineering encompasses:

  • What goes in the system prompt and how it is structured
  • What retrieved documents or tool outputs get included and how they are formatted
  • How conversation history is managed and what gets pruned
  • How multi-step reasoning is sequenced so each step has exactly what it needs
  • How tool definitions and examples are structured to minimize ambiguity

Think of it this way. The LLM is the CPU. The context window is RAM. Prompt engineering is writing the instruction the CPU executes. Context engineering is the operating system that manages what sits in RAM so the CPU can do its best work.

Why the Shift Happened Now

Three things changed between 2023 and 2026 that made prompt engineering insufficient.

Agents replaced chatbots. A chatbot answers one question. An agent performs multi-step tasks across dozens of turns, calling tools, reading documents, and maintaining state. A single prompt cannot manage the information flow of a 50-turn agent session. The context window accumulates tool outputs, retrieved documents, and intermediate reasoning. Without active management, the context rots.

Context windows got big enough to cause problems. When models had 4K-token windows, you could not put much in them. The constraint was obvious. Now models support 128K to 1M+ tokens. The temptation is to throw everything in and let the model sort it out. This fails. Chroma Research showed that every LLM degrades as context grows, often hitting a cliff around 32K to 64K tokens. A focused 20K-token context beats a bloated 200K-token context on virtually every task.

Failure modes became visible. Drew Breunig at Google identified four specific ways context breaks down in agent systems. These failure modes are invisible if you only think about prompt phrasing. They only make sense when you think about information architecture.

The Four Context Failure Modes

Context Poisoning

A hallucination enters the context and gets treated as ground truth. Google DeepMind documented this with their Gemini Pokemon agent. One hallucinated game state propagated into goals and summaries. The agent generated nonsensical strategies that persisted for the entire session.

This is especially dangerous for local LLMs, which hallucinate more often than frontier models. Without validation, errors cascade through every subsequent turn.

Context Distraction

Accumulated information overwhelms the model's training-time knowledge. A Databricks study found accuracy drops around 32K tokens for Llama 3.1 405B. The drop comes earlier for smaller models. The Gemini Pokemon agent started repeating past actions from history beyond roughly 100K tokens. It literally forgot how to play because its history was louder than its training.

For local models with 32K to 128K windows, distraction hits after 15 to 20 complex tool interactions.

Context Confusion

Irrelevant information influences decisions. The Berkeley Function-Calling Leaderboard proved that every model performs worse with more tools. A quantized Llama 3.1 8B given 46 tools failed a task it solved easily with 19 tools. Everything fit in context. The model still failed because it had to attend to all 46 tool definitions on every call.

Context Clash

Different parts of the context disagree. A Microsoft and Salesforce team showed that splitting the same benchmark across multiple turns caused a 39 percent accuracy drop. OpenAI's o3 dropped from 98.1 to 64.1. Early preliminary answers remain in context and act as strong priors for the final answer. The researchers summarized it plainly: "When LLMs take a wrong turn, they get lost and do not recover."

The Four Context Engineering Operations

The industry has converged on four core strategies. Each maps directly to one or more failure modes.

Write: Persist Information Outside the Context

Write important information to external storage and retrieve it on demand.

The most common pattern is the MEMORY.md scratchpad. The agent maintains a structured file with goals, observations, decisions, and blockers. It reads the file at the start of each session. Claude Code does this. OpenClaw agents do this. It works because the context window does not grow unboundedly. Critical state survives context resets. And the act of writing forces the agent to synthesize, which itself improves quality.

At scale, tools like Mem0, Letta, or Redis provide semantic memory queries. These are more powerful than flat files when your agent accumulates hundreds of facts.

Select: Retrieve Only What Is Relevant

Do not pre-load everything. Pull data just-in-time so you pay the token cost only when information is actually needed.

Tool-based retrieval lets the agent decide what to load based on the current task. Claude Code writes targeted queries and uses head and tail to extract specific sections rather than loading entire files. RAG embeds your knowledge base into ChromaDB or Qdrant and retrieves relevant chunks at query time. Progressive disclosure lets the agent explore incrementally, building understanding layer by layer.

The difference between giving a 14B model 50K tokens of noise and 5K tokens of signal is night and day.

Compress: Reduce What Is Already There

When context grows too large, compress without losing critical information.

Conversation compaction summarizes history and reinitiates with the compressed summary. Claude Code preserves architectural decisions and unresolved bugs while discarding redundant tool outputs. Tool result clearing replaces old outputs with brief summaries or removes them entirely. Anthropic launched this as a platform feature in 2026. Sliding windows with anchors keep the system prompt and last N turns while summarizing everything between them.

For 32K local models, set a compaction threshold at 75 percent usage. Summarize into a structured brief with goals, progress, blockers, and key findings. Reinitiate with the brief plus the system prompt plus the last three turns. This lets a 32K model handle tasks that would otherwise require 200K tokens of history.

Isolate: Split Work Across Separate Contexts

Use multiple agents with clean, focused context windows instead of one agent trying to hold everything.

A coordinator agent delegates focused tasks to specialized sub-agents. Each sub-agent has its own clean context. It processes, returns a summary, and its full context is discarded. The parent context stays lean. Cognition's Devin uses this pattern for complex coding tasks. Fan-out and fan-in architectures spin up multiple agents in parallel to investigate different aspects of a problem.

Isolation is the nuclear option against all four failure modes. A clean context window is the most reliable way to prevent poisoning, distraction, confusion, and clash.

The Job Market Is Real

This is not just terminology. In Q1 2026, context engineering skills appeared in job postings across five role categories:

  • AI and ML Engineer positions at companies building on foundation models
  • Agent Engineer roles where context quality determines agent reliability
  • Standalone Prompt and Context Engineer positions at larger companies
  • AI Product Manager roles that now require working knowledge of context engineering
  • RAG Engineer and Knowledge Engineer roles focused on retrieval pipelines

Compensation ranges from $140,000 to $280,000 at US-based tech companies. The highest packages are at model providers like Anthropic, OpenAI, and Google DeepMind, and at well-funded agent startups.

Why This Matters for Builders

If you are building AI systems, you are already doing context engineering. You might just be doing it badly. Every decision about what to put in the system prompt, what to retrieve, what to keep in conversation history, and what to discard is a context engineering decision. The question is whether you make those decisions deliberately or by default.

The models are good enough now that the bottleneck has shifted. GPT-4o, Claude Sonnet, and Qwen 3 can all reason well when they have the right information. They fail when the context is wrong. Context engineering is the discipline of making the context right.

Prompt engineering still matters. A well-crafted instruction inside a well-architected context produces the best results. But a well-crafted instruction inside a poisoned, distracted, confused, or clashing context produces garbage. The context is the foundation. The prompt is the finishing touch.

Stop thinking about prompts. Start thinking about information architecture.


Citations

Suggested Title

Context Engineering Is Not Prompt Engineering With a Better Name

Word Count

1,540

Fact-Check Notes

  • Tobi Lutke's tweet from June 2025 is widely referenced but I was unable to fetch the original tweet directly. The claim that he tweeted "context engineering is the new prompt engineering" is supported by multiple secondary sources. The exact wording may differ.
  • The Drew Breunig "four context failure modes" framework comes from his June 2025 blog post. I fetched and confirmed this content exists at the referenced URL.
  • The Chroma Research "context rot" claim is referenced by ToolHalla but I did not independently verify the original Chroma research paper.
  • The Databricks accuracy drop at 32K tokens for Llama 3.1 405B is referenced by ToolHalla. I did not independently verify the Databricks study.
  • The Microsoft/Salesforce 39% accuracy drop and OpenAI o3 dropping from 98.1 to 64.1 are referenced by ToolHalla. I did not independently verify these figures from the original papers.
  • The compensation range of $140K to $280K comes from AgenticCareers, which has a commercial interest in promoting the field. These figures should be treated as industry estimates rather than verified data.
  • The "Gemini Pokemon agent" hallucination example from Google DeepMind is referenced by ToolHalla. I did not independently verify the original source.
  • The Berkeley Function-Calling Leaderboard result (Llama 3.1 8B failing with 46 tools vs succeeding with 19) is referenced by ToolHalla. I did not independently verify the benchmark data.