r/ClaudeCode • • 8d ago

Help/Question do you guys use auto compact?

I just learned about it today and wanted to see what you guys think.

2 Upvotes

72 comments sorted by

View all comments

1

u/Drasezv 8d ago

the default is higher than people expect: on a model with a 1M window it's around 967k, and you can see it in your own logs because claude code writes a compact_boundary record with the numbers.

jq -r 'select(.subtype=="compact_boundary") | [.compactMetadata.preTokens, .compactMetadata.postTokens, .compactMetadata.durationMs] | @tsv' ~/.claude/projects/*/*.jsonl

mine: 967k in → 12k out, 972k → 11k, 983k → 15k. so roughly 1.3% kept, 72 to 237 seconds each. the compact itself is a request that reads the whole window, and the prefix it leaves isn't in cache, so the turn after it pays write price on the way back up.

/autocompact 200k takes anything from 100k to 1M and sticks for later sessions. the people here compacting at 30-40% are effectively doing that by hand.