How idle compaction works

The clearest explanation came from the team that built it.

"It now compacts long idle sessions right before the prompt cache expires (~1h). If you come back to it later, it only has to reprocess the summary instead of the entire conversation, which saves you some usage," Lydia Hallie of the Claude Code team wrote.

Here's what sits under that. Claude Code keeps a prompt cache that makes repeated work cheap, and it lapses after roughly an hour. Before this change, coming back to an old session meant reprocessing the whole conversation again at full price.

Now the tool writes a condensed summary just before that cache expires, so you resume from the short version instead of the long one. It only kicks in on qualifying interactive terminal sessions, not everywhere.

AI Coding Assistant Rollout Guide - Logiciel Solutions Read more: AI Coding Assistant Rollout Guide

The savings can be big

Some heavy users are posting real numbers. One said 94% of their agent tokens ended up coming from cheap cache reads rather than full reprocessing. Others are calling it a good match for how they actually work, which is leaving a session open, doing something else, and wandering back to it later.

For people running agents all day, that gap between a full reprocess and a quick summary is where the money goes.

Not everyone wants it on

There's some pushback too. In long, complicated workflows a summary can drop a detail that turns out to matter, and a few developers would rather keep the entire history intact. Anthropic left them an out. Setting "idleCompaction": false in settings.json switches the whole thing off.

Why it matters

It sounds minor, and in isolation it is. But these tools bill by the token, and the cost of leaving an agent idling has been a quiet gripe among developers for a while.

Idle compaction chips away at that without forcing anyone's hand, since the people it doesn't suit can turn it off in one line. That balance, a default that saves most people money and a switch for the ones it would trip up, is really the whole story here.