Skip to content

Context Management

Engineering what the model sees at inference time.

Context management is the work of deciding what information goes into a model’s context window at inference time — context engineering, windowing, and guarding against failure modes like context poisoning and context rot that degrade an agent’s reasoning.

Context management includes system instructions, tool definitions, retrieved data and conversation history. Anthropic's context-engineering guide describes curating these together and loading information as needed, with compaction and external notes for longer tasks (Anthropic, Effective context engineering for AI agents). A practical design exercise is to list what must survive a task handoff: the goal, constraints, evidence and unresolved decisions. Keep that list alongside your tests for context changes.

Michel Tricot in episode 52 demonstrates the costs of giving an agent poorly shaped data through raw API calls. Kapil Chhabra in episode 75 distinguishes data definitions from the business context needed to interpret them. What is context in AI agents? gives the foundation; prompt vs context vs memory engineering separates the engineering responsibilities. For information that persists between tasks, continue to agent memory.

Try it in your own project: repair a stale handoff, copy the template, and check the next session.

7 episodes

Explainers on this topic

Terms on this topic

Essays on this topic

Guests on this topic

Kapil ChhabraJaime DeLangheJerry LiuRichmond AlakeMichel TricotAishwarya SrinivasanAurimas Griciūnas