Urgent.News

What's breaking now, across thousands of outlets.

Tech

My context grew 6x in three months. That decides the cache question

"How much does it cost to resume an old session?" The window is 5 minutes, not 40-60 - and what decides the cost is his own context at 546,151 tokens Anton wants to look up what it costs to resume an old session in Claude Code, Codex, Antigravity and Cursor. His hypothesis: if you come back later than 40-60 minutes, the whole context history is sent again and all the tokens have to be paid for a…

Claude Code users are curious about session resuming costs. One user hypothesizes that if they wait more than 40-60 minutes before resuming, the entire context history will be sent again and all tokens will have to be paid for a second time. Inside that 5-minute window, it's cheaper thanks to caching. The exact cost depends on the tool being used and whether the session is on the default 5-minute or extended 1-hour tier.

Using Antropic's pricing, a 1-hour write costs 2x the base input rate, while a 5-minute write is 1.25x the rate. Caching also reduces costs - reads are 0.1x the rate and break even after one read on the 5-minute tier. The TTL (time-to-live) degrades under heavy load, shortening the window when work has been heaviest. For OpenAI, the window is 30 minutes, extendable to 12 hours at up to 90% off cached input.

Antigravity and Cursor were not measured for caching. The hypothesis is flawed because subscription work doesn't follow API billing - tokens are paid for a second time on a cache miss, but on a plan, it burns quota. Context size, not window length, determines the cost. The user's own measurements show the median context size grew sixfold in three months.

Resuming inside the TTL costs 0.1x the token amount, while a cache miss costs the full amount. Compact prompts and start fresh guarantee a cache miss and reduce costs when context is large and has passed the TTL.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 18 November →