Let the API compact the conversation server-side (compact-2026-01-12)

Caps billed input at the summary + recent turns on long runs Advanced 3 min read

On long agentic Claude runs, every turn re-bills the entire growing history. Anthropic's server-side compaction auto-summarizes the conversation into a compaction block at a token trigger, then drops all blocks before it on the next request so you pay for the summary plus recent turns instead of the full transcript.

๐Ÿ”’ Pro tip ยท Advanced

Unlock this tip โ€” and 105 more

This is one of 106 advanced, fact-checked tactics reserved for Pro. Get the full 128-tip library, a searchable archive, and a new tip every morning. Free for 7 days, then $9/mo.

Prefer to browse? The 22 Beginner tips are free forever.