The Context about Context: Why Enterprise AI Is Overspending on Re-Discovery

CoreStory

TL;DR Enterprise AI teams use the word “context” to mean too many different things: context windows, RAG, MCP, repo maps, and persistent system intelligence. Those layers solve different problems. The expensive failure mode is re-discovery: every coding-agent session re-learns the same architecture, business rules, and dependencies instead of querying durable intelligence that already exists.

“Context” has become one of the most overloaded words in enterprise AI. When a vendor says it gives a model “the right context,” that could mean a large token window, retrieved snippets, an MCP connection, a repository map, or a knowledge graph.

Those approaches are not interchangeable. They differ in what they can represent, how reliable they are, and how much they cost to reuse. Treating them as one category is one reason AI coding programs become more expensive as they move from pilots to production.

The economics are already visible. Menlo Ventures estimates that model API spending more than doubled from $3.5 billion in late 2024 to $8.4 billion by mid-2025 as AI workloads shifted toward production inference. Gartner warns that falling token prices do not make frontier reasoning cheap: agentic models can require five to 30 times more tokens per task than a standard GenAI chatbot.

The practical problem is not that models lack enough room. It is that agents keep paying to recover the same system understanding from scratch.

The economic paradox: cheaper tokens, higher bills

Modern coding agents do not usually begin with a complete understanding of your system. They discover it episodically. They open a file, inspect an import, trace a dependency, run a search, infer a caller, and revise their plan. That loop is useful. It is also expensive.

The cost multiplies because the work is repeated. A developer asks about authentication on Monday; the agent reads source and follows relationships. Another developer asks a related question on Tuesday; another session does the same discovery. A third agent performs a migration task on Wednesday; it traces the same dependency paths again.

Prompt caching helps. Anthropic reports that prompt caching can cut costs by up to 90% for repeated long prompts, with actual savings depending on workload and cache hit rate. But caching mostly reduces the cost of re-reading stable prompt material. It does not, by itself, turn a codebase into durable system knowledge.

That distinction matters. If the system understanding disappears when the session ends, the organization is still paying a re-discovery tax.

The five layers of context

1. Windowcapacity
2. Retrievalcandidates
3. MCPtransport
4. Repo mapstructure
5. Persistent intelligencedurable meaning
Each layer solves a different context problem. The final layer makes system understanding reusable across tasks and sessions.

The way out starts with clearer language. “Context” is not one capability. It is at least five layers.

LayerWhat it providesWhat it does not solve
Context windowCapacity: how many tokens the model can receiveWhether the model uses long input reliably
Retrieval / RAGTopical candidates and relevant passagesDeep architectural relationships or intent
MCP / tool contextA standard way for tools and systems to talk to modelsThe quality or shape of the returned signal
Code / repo contextSyntax, symbols, files, and local relationshipsBusiness meaning, ownership, and cross-system consequences
Persistent system intelligenceDurable understanding of architecture, workflows, business rules, dependencies, and constraintsIt still needs governance, freshness checks, and evidence boundaries

Each layer has value. The mistake is asking one layer to do another layer’s job.

A large context window gives the model room, but room is not fidelity. Chroma’s Context Rot research found that model performance can degrade as input length grows, even under controlled tasks designed to isolate context length. Long context is useful, but it does not remove the need to decide what belongs in context and how it should be represented.

RAG is useful for finding likely relevant text. It is a candidate generator. It is not the same as knowing that a billing workflow calls a fraud check, that a field carries regulated data, or that a downstream batch job depends on a specific status value.

MCP is an open standard for connecting AI applications to external systems. It solves an integration problem, not the quality of the returned context. A tool can return concise, governed intelligence or a raw dump that fills the context window and leaves the model to infer structure again.

Repo maps and syntax indexes help agents navigate source code. They are especially helpful in smaller or newer codebases. But enterprise systems usually carry more than syntax. They carry business rules, operational ownership, compliance constraints, and historical decisions that do not appear cleanly in one file.

Persistent system intelligence is the layer designed to make that knowledge reusable.

The re-discovery tax

The default stack for many AI coding efforts combines long-context models, repository search, RAG, prompt caching, and tool calls. That stack can work well for a single task. It is less efficient when every task has to reconstruct the same architecture.

Every time an agent asks “what does the auth service do?” it may have to inspect routes, read configuration, follow imports, search for callers, and infer how a workflow behaves. If the answer is not captured as reusable intelligence, the next session repeats the work.

The tax shows up in three places:

  • Token cost. Agents consume tokens while reading and re-reading material that the organization has already paid another session to inspect.
  • Latency. Developers wait while the agent rebuilds a map that should already exist.
  • Risk. Two agents can infer different answers from the same system if their discovery paths differ.

Caching reduces some repeated input cost inside a window of reuse. It does not solve drift, provenance, or cross-session memory of system meaning. A cached prompt is not the same thing as a governed model of the software.

What persistent code intelligence changes

CoreStory’s position is simple: enterprise agents need persistent code intelligence, not just more tokens.

CoreStory builds a persistent, queryable intelligence model from source code. It gives people and AI tools access to architecture, behavior, business logic, and intent. Teams can query that model in the product, while compatible coding agents can reach the same project intelligence through CoreStory’s MCP server.

This changes the agent’s job. Instead of reconstructing the same system map from source files every time, the agent can query structured intelligence that already exists. The agent still reasons, plans, edits, and verifies. But it begins with a better representation of the system.

That is the difference between giving an agent more text and giving it something to know.

Why governance matters as much as retrieval

Enterprise context is not just a relevance problem. It is a trust problem.

A coding agent needs to know whether a claim about the system is supported, partial, stale, or unverified. A product leader needs to know where an answer came from before making a roadmap or customer commitment. An engineering team needs to know when an inferred relationship should be tested before it becomes an implementation assumption.

Durable context should carry evidence, provenance, freshness, and uncertainty. Otherwise, it becomes another form of confident text.

CoreStory is building around that principle: important claims should connect to inspectable source evidence and clear confidence boundaries, not simply appear as assertions. For agentic development, that is the difference between “the model sounded right” and “the answer can be checked.”

How to evaluate your AI context stack

Engineering leaders do not need a new buzzword. They need a diagnostic.

Start with four questions:

  1. What context are agents repeatedly discovering? Look for repeated searches, file reads, and explanations of the same services or workflows.
  2. Which context survives the session? If the answer disappears when the chat ends, the organization will pay for it again.
  3. What context is evidence-backed? Separate sourced system facts from inference, guesswork, and outdated documentation.
  4. What context can other tools query? If humans, agents, CI workflows, and governance systems cannot reuse the intelligence, it will not compound.

If most of the budget goes to rediscovering architecture, the problem is not token price. It is representation.

Understanding is the new value

The next phase of enterprise AI will not be won by stuffing more raw text into larger windows. It will be won by organizations that represent their systems in a form agents can reuse.

Code generation keeps getting cheaper. Understanding remains scarce.

Persistent code intelligence turns software knowledge from a temporary byproduct of one session into an asset the next session can query. It reduces re-discovery, improves consistency, and gives teams a better way to govern what agents think they know.

If your AI coding program is spending more each month while answering the same architectural questions, the next step is not another context-window increase. It is a persistent intelligence layer for your software.

FAQ

Is a larger context window enough for enterprise coding agents?

No. Larger windows increase capacity, but they do not guarantee reliable use of long input. They also do not create reusable system understanding across sessions.

Does RAG solve the context problem?

RAG helps find relevant material. It does not, by itself, model architecture, business rules, ownership, constraints, or downstream dependencies.

Where does MCP fit?

MCP standardizes how tools expose context to models. It improves integration, but the quality of the returned context still depends on the system behind the tool.

What is persistent code intelligence?

Persistent code intelligence is a reusable model of how a codebase works: architecture, workflows, business rules, APIs, dependencies, and constraints. It is built from the codebase and made available to humans and AI agents wherever work happens.

What should teams do first?

Audit repeated agent discovery. If agents keep retracing the same services, dependencies, and business rules, start by turning that recurring discovery work into durable, queryable intelligence.

Build persistent context for your software

CoreStory builds a persistent intelligence layer for enterprise software systems so humans and AI agents can query how the code actually works. If you are ready to stop paying the re-discovery tax, talk to a CoreStory expert.

CoreStory
CoreStory Editorial Team