Skills
Use reversible context editing + a memory tool over plain truncation — +39% and 84% fewer tokens
Anthropic's evals show context editing (stripping info that already exists in the environment, reversibly — the agent can re-fetch with a tool) delivers a 29% performance lift alone, rising to 39% combined with a memory tool, and cut token consumption 84% in a 100-turn web-search eval that otherwise failed from context exhaustion. The key distinction: compaction is reversible (re-readable later) while summarization is lossy, so prefer reversible editing first and only summarize at a context-rot threshold (~128k). Production teams can adopt the compaction API (compact-2026-01-12) across Claude API, Bedrock, Vertex, and Foundry.
↳ Follow the thread