2025-09-29 · Anthropic

Effective context engineering for AI agents

agents

read at source ↗ www.anthropic.com

Effective context engineering for AI agents

Source: Anthropic Engineering Date: 2025-09-29 URL: https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents

Summary

Anthropic frames “context engineering” as the discipline of managing token allocation across an agent’s entire lifecycle — specifically, finding “the smallest possible set of high-signal tokens that maximize the likelihood of some desired outcome.” The post covers system prompt structure (XML/Markdown sections), just-in-time retrieval over pre-loading, and long-horizon techniques (compaction, structured note-taking, multi-agent decomposition) as mitigations for context rot — accuracy degradation as window size grows.

Implications

The context management thread. This is the term-defining post — “context engineering” as a named discipline is Anthropic staking out a position that prompt engineering is insufficient for agent work. The framing puts a name on what good harness designers are already doing and gives it purchase as a product category.

Context rot is acknowledged. Explicitly naming context rot as an architecture-level problem (not a prompting problem) validates the design choices in the effective-harnesses post (context resets > compaction for long runs). Together these form a consistent Anthropic position on window management.

Just-in-time retrieval as the default pattern. Pre-loading everything into context is now explicitly an anti-pattern. This directly informs how to design tools for Claude Code pipelines: surface identifiers and lazy-load, don’t dump full documents into the system prompt.

← all signals