glossary//context-engineering

memory

context engineering

Context engineering is the practice of deciding what goes into a model's context window at runtime: what gets retrieved, what gets injected before the model reads anything, what gets compressed, and what stays out.

Sep 2026

The term most people substitute for it is prompt engineering, and the two are different jobs. Prompt engineering is about the wording of an instruction. Context engineering is about what material is in front of the model at all, where it came from, and who chose it. You can write a perfect prompt over the wrong context and get a confidently wrong answer.

It is also not the harness. Deciding what the model sees is one of the concerns a harness has to handle, alongside routing, permissions, and gates.

The unresolved part

The naive approach is to persist the conversation and inject the last N turns on every prompt. Give the model the tools, not the context shows where that hits its two walls. The first is tokens. The second is coherence: past roughly twenty turns the signal-to-noise ratio drops and the model starts losing the thread.

Its answer is to change the question. Asking how much recent context to inject assumes the harness has to decide, up front, what the model will need, before the model has read the prompt. It cannot know that. The better question is who decides what to retrieve, and the answer that holds up is: the model does, on demand, after it has seen what you asked. The prior art it cites runs the same direction, MemGPT (now Letta), Mem0's fact extraction, Zep and Graphiti's temporal graph.

That is not the whole story, and the corpus is honest about it. Memory is easy, retrieval is hard is the production counter-case: Rheo shipped retrieval tools and the model would not reliably call them. A prompt with no recent history looks almost identical to a brand-new conversation, so the model treats it like one. It does not notice what is missing. The fix went the other way, injecting context at boot before Claude sees the user message, at a cost of a few hundred milliseconds and roughly 1,000 to 2,000 tokens per turn.

Where the work actually lands

Once you inject, the shape of what you inject becomes the problem. One call, the real prerequisite collapses four boot-time calls into one because the four reads do not depend on each other. That is context engineering at its most ordinary and most useful: deciding how much goes in, in what shape, and what it costs per turn. Not a philosophy question.