Issue 27, Nov 1, 2026

The Context Compaction Trap

Senior AI Engineer interview at Anthropic, and the interviewer asks:

“You swapped raw tool outputs for LLM-generated summaries in your coding agent. Prompt size dropped sharply. But cost per resolved issue didn’t move, and on some runs it went up. Where did the savings go, and how do you prove it from the traces?”

Don’t say: “The summarizer call itself costs tokens. Use a cheaper model for summarization.”

Why aggressive LLM observation summaries force agents to repeat past tool actions, exploding overall token spend despite smaller per-turn context windows.

Share this trapShare on LinkedIn

The full answer, with the mechanism and the arithmetic, is for paid subscribers on Substack.

Read it on Substack

Get the next one

Free on Substack. Unsubscribe in one click.

More traps set at Anthropic