← Field Notes

Field note · Context and memory · 2026

Context is the operating system of an agent

Prompt wording is only one input. Agent behaviour emerges from the complete information environment: instructions, tools, retrieved evidence, working state, history, memory and the policy deciding what is allowed into the context window.

AudienceCTOs · founders · engineering leaders
PerspectiveProduction architecture and delivery
FormatOriginal analysis grounded in primary sources

A finite resource

Long context is not free memory. Every token competes for attention, latency and cost. More context can obscure the evidence that matters, preserve outdated assumptions and amplify contamination from failed attempts.

A layered model

Separate stable instructions, task state, recent interaction, retrieved knowledge, episodic memory and reusable procedural skills. Each layer needs a write policy, retrieval policy, expiry rule, provenance and access-control boundary.

Compaction without amnesia

Summaries should be structured artifacts with decisions, unresolved risks, evidence and next actions, not generic conversation compression. Tool outputs can be cleared after extracting validated state, while immutable audit records remain outside the model context.

Context quality gates

Evaluate relevance, sufficiency, isolation, economy and provenance before inference. Conflicting or stale memories should be surfaced, not silently blended. Sensitive context must remain scoped by user, tenant and purpose.

Executive takeaway

A context strategy determines reliability and cost as much as model selection. Treat context as governed infrastructure with owners, budgets and measurable quality, not as text appended to a prompt.

Primary reading

  1. Anthropic : Effective context engineering for AI agents
  2. Anthropic Cookbook : context engineering patterns
  3. Anthropic : Multi-agent research system