sixdegree

Context·Agents·AI

Context Engineering vs Context Management: What's the Difference?

Context engineering operates at the prompt layer. Context management is the infrastructure underneath. Why mixing them up is the most common reason agent pilots fail.


By Craig Tracey · 

Context Engineering vs Context Management: What's the Difference?

Context engineering and context management get used as synonyms. They are not the same thing.

Context engineering is the inference-time discipline of deciding what goes into the model's context window on a given turn. It is prompt-layer work: which tools to surface, how to compact conversation history, how to prune tool results, how to route messages between sub-agents. It assumes the sources it draws from are correct.

Context management is the upstream discipline of making that assumption safe to make. It operates outside the inference call, at the infrastructure layer. It determines whether the service ownership record the agent is reading from reflects the current org chart, whether the customer identity is resolved consistently across six systems, whether the incident history the agent just queried is complete. It determines whether what the agent loads is true.

Engineering picks what to load. Management guarantees what's loadable is true.

Both disciplines are necessary. Their failure modes are different. The teams that own each are different. The tools that address each are different. The intervention that fixes a failure in one is useless against a failure in the other. Collapsing them into a single phrase is how teams spend quarters tuning the wrong layer.

This post separates them.

What context engineering is

The clearest articulation in the public literature is Anthropic's Effective context engineering for AI agents, which is worth reading in full if you are building agent systems. What follows is the summary relevant to the distinction being drawn here.

Context engineering is everything that happens between the user's input and the model's invocation. The model has a context window: a fixed budget of tokens. Into that window goes the system prompt, conversation history, tool definitions, retrieved documents, tool results, and anything else the agent needs to act. The engineering discipline is about constructing that window well.

The core operations: compaction (summarizing long histories and tool outputs without losing signal); retrieval (deciding which records or documents to include given the current query); tool surface design (exposing a minimal, semantically coherent set of tools per task rather than surfacing everything available). Progressive disclosure is the pattern that makes tool surface design work at scale. Tool result pruning, sub-agent routing, conversation history management, and system prompt construction round out the practice.

A context engineering failure looks like the model losing the thread across turns, surfacing tools it then misapplies, or conflating information from different tool calls that weren't structured clearly. Tool overload is among the most common: the model degrades measurably as the exposed surface expands past a threshold, and recovering requires reducing the tool set, not improving the model.

Crucially: context engineering assumes the upstream context is correct. It optimizes window construction. It has no mechanism for detecting whether the source data is stale, identity-broken, or inconsistent across systems. That assumption is where engineering hands off to management.

What context management is

Context management is the upstream discipline of ensuring that the sources the agent reaches for are accurate, current, governed, and coherent. It operates outside the inference call. It is infrastructure-layer work.

The concrete examples cluster into recognizable patterns. Service ownership: which team owns which service, who is on-call, which codebase handles which endpoint. These facts live across GitHub, PagerDuty, the IdP, and whatever catalog your organization runs. Without context management, an agent asking who is on-call for the payments service might read from a YAML file that was accurate in February and has been wrong since the last reorg. Customer identity: the same account exists under different IDs in Salesforce, Zendesk, Stripe, and the warehouse. An agent traversing from a support ticket to a renewal status to a recent deploy has to resolve that identity at every hop. Deployment lineage and incident history require the same continuous derivation from the systems that actually hold the record.

Context management is the work that makes those facts trustworthy: deriving entities and relationships continuously from systems of record, resolving identity at ingest time, enforcing policy at the query layer, exposing the result through a protocol the agent can call at decision time. The broader argument for what this substrate looks like in production is a separate treatment.

A context management failure looks nothing like an engineering failure. The agent doesn't lose the thread. The tool calls are clean. The window is well-constructed. The agent produces a confident, coherent, wrong answer because the source it read from was stale. The data was loaded correctly. It just was not true. That distinction matters because the two failure modes point to different teams, different budgets, and different fixes.

The query optimization vs schema design analogy

The cleanest mental model for the relationship between these two disciplines comes from database engineering.

Query optimization is runtime work. You write a query, the planner chooses an execution strategy, indexes are consulted, join order is decided. A good optimizer can get a complex query down to milliseconds. The plan can be tuned, the indexes can be rebuilt, the query can be rewritten. This is all execution work, and it happens at query time.

Schema design is different in kind, not just degree. It happens months earlier, in a different conversation. Which tables exist. How foreign keys propagate. Whether identity is normalized or denormalized. What the grain of each fact table is.

A great query against a bad schema returns wrong answers fast. The optimizer can be perfect, the plan elegant, the indexes tuned. If the schema collapses identity in a way that makes a join return incorrect rows, the result is wrong regardless of how clean the execution was.

Context engineering is query optimization. Context management is schema design.

A perfectly engineered prompt against a stale, fragmented source returns hallucinations quickly and confidently. The retrieval is clean. The tool call is well-formed. The compaction is elegant. The answer is wrong because the source is wrong. The intervention that matters is not refining the retrieval or tightening the prompt. It is fixing the substrate.

Why the distinction matters

The misattribution problem is the costliest practical consequence of treating these as the same thing.

The pattern is consistent. A team deploys an agent. It produces confidently wrong answers. The team blames the model: too generic, not fine-tuned on domain vocabulary. They switch models. It gets marginally better. The confident wrong answers continue. They tune the prompt: tighter system instructions, cleaner tool definitions, more explicit constraints. Some improvement. Same category of failure. They add better embeddings, smarter retrieval, a re-ranking layer. More improvement. The same questions keep going wrong.

The iteration loop can run for quarters.

The real failure is upstream. The agent is reading from a source that is stale, or from two sources that should resolve to the same entity and don't. The service catalog doesn't reflect ownership after the last reorg. The customer ID in the support tool doesn't map to the same entity as the account in the CRM. The incident history is complete for the last 90 days and missing the one prior event that would have changed the answer.

No amount of prompt engineering rescues this. The model is doing exactly what a good model should do: reading available context and producing a coherent, plausible response. The context is not true. The answer inherits that.

The cost is not just wrong answers in isolation. It is the time spent iterating in the wrong layer, the accumulated trust erosion when the agent keeps getting things wrong in the same way, and the executive conclusion that the AI is not ready when the AI is fine and the substrate is broken.

The diagnostic is specific: when agent failures are about what the agent remembered from earlier in the conversation, the problem is engineering. When agent failures are about what the agent knew about the world, the problem is management.

How they fit together

Engineering operates at the prompt layer. Management operates at the infrastructure layer. The interface between them is the tool call.

Up to the moment the agent calls a tool or queries a data source, engineering is in charge. It has decided which tools to surface, how to structure the request, what context to carry across turns. At the call itself, management takes over. It determines what comes back.

A concrete example. A coding agent is triaging an incident. Engineering designs the system prompt that frames the agent's role, selects the relevant tools (incident lookup, service ownership query, deployment history, on-call schedule), and structures the conversation so the relevant prior context stays accessible. When the agent calls the service ownership tool, management determines the answer. If the ownership substrate is a static YAML file updated eight months ago, the agent routes to the wrong team. No engineering decision changes this.

In a well-built stack, the two disciplines know about each other but operate independently. Engineering trusts management to return accurate data. Management does not care how engineering surfaces its outputs. The interface is a protocol, increasingly MCP, and the discipline is in keeping responsibilities on the correct side of it.

What this makes possible: the engineering team can iterate on prompt construction and tool design without touching the context management infrastructure. The infrastructure team can expand integration coverage and improve identity resolution without touching the agent's reasoning layer. The separation makes both teams faster.

When to focus on which

A practical decision rule calibrated by scale and stakes.

Small team, controlled environment, one team's workflow, a limited set of tools, a few thousand entities: context engineering will carry you most of the way. The sources are narrow enough to hand-curate. You can verify they are fresh. You can put the majority of the work into prompt construction and retrieval tuning. This is where most agent demos and early prototypes live. It is the right place for them to live.

Multi-team, multi-system, regulated environment: anything that crosses departments, touches customers, or has real consequences for wrong answers. Here, context management becomes the binding constraint. Hand-curation does not scale. Systems of record change too fast. Identity has to resolve across too many tools. Policy requirements get complicated in ways that cannot be summarized into system prompts.

The transition point is usually the first time the agent crosses a system boundary that matters. A useful signal: pay attention to what users are actually asking. Questions about interpretation of what was just said ("summarize that," "what did you mean," "reformatted as a table") reward engineering work. Questions about the state of the world ("who owns this," "what's deployed where," "is this customer at risk") reward management work.

Most enterprise agents end up doing both. The ones that work in production invest in both layers from the start and keep the boundary between them legible as both evolve.

The bigger argument

The AI infrastructure category is spending most of its public attention on context engineering. Prompt design patterns, tool surface optimization, retrieval techniques, multi-agent framework comparisons, context window management. That is where the technical conversation is loudest and where the books, tutorials, and conference talks are aimed.

The harder problem is upstream. Most enterprise agents are not failing because prompt-construction patterns are immature. They are failing because the substrate the agent reads from is stale, fragmented, identity-broken, and governance-inert. Fixing that requires a different category of investment: one that looks more like data infrastructure than prompt engineering, and one that gets less attention than it deserves.

Context engineering is the work above the substrate. Context management is the substrate itself. Both matter. The diagnostic for which one to fix first starts with knowing the difference.

The full argument for what that substrate looks like in production is a longer read.

We're onboarding design partners now.

Shape the product. Lock in early pricing. Direct founder access. Limited spots available.