tokensitter
Features/Cache keep-alive
Cache keep-alive

Take a break.
Keep the context warm.

An experimental local hook can read a large cached prefix before it expires, so a later return may avoid rebuilding it.

Add to Claude CodeOpenAI Codex: coming soon

Local Claude Code plugin · off / experimentalEvidence snapshot: 27 Oct 2026 · per-lever live deployment not verified

Inside the workflow
Wait before wakingAfter Claude finishes, the hook waits before a short wake.
Bound the chainThe background wake repeats for a limited time after the last user message.
Only save if you returnA ping incurs cost.
Transparent by designEvery claim needs a baseline

What changes.
And what does not.

Availability differs between the API relay and the local plugin. Whether each lever is deployed on the live relay has not been independently checked.

Wait before waking

After Claude finishes, a background hook waits, then wakes the session with a one-line note so the cached prefix is read instead of rebuilt after it expires. The tested schedule: A cached prefix of about 100,000 tokens, pinged on the shipped schedule (every 55 minutes, at most 3 hours), then resumed; the cold case is the same resume under a never-seen prefix. It is intended for long-lived caches and large contexts.

Bound the chain

The background wake repeats for a limited time after the last user message. The feature is off by default and experimental.

Only save if you return

A ping incurs cost. If nobody resumes, there is no saving to offset that cost. Return probability is part of the decision.

The boundary. Cache: the one-hour expiry was not waited out; the cold resume is a never-seen prefix, which bills the same full cache write. This is cost-only evidence, not a response-quality test. On a subscription the figures are plan usage, not cash.

Fewer tokens is only
half the question.

Token and cost accounting only; this is not a quality evaluation. A separate check established the short expiry behavior, and the one-hour cold arm used an unseen prefix rather than waiting out the full hour.

Checks that would strengthen this evidence. They are not yet reported for this feature:

Task correctness

Check answers against an objective test, not against how plausible they look.

Full cost

Include cache writes, cache reads, retries, recalls and helper calls when they apply.

Workload boundaries

Keep the tested model, task type and cache condition beside the result.

Failure reporting

Keep observed misses and untested conditions visible.

Same task.
A stated baseline.

Sonnet 5.5 on the Messages API, one-hour cache. 5 repetitions at 100,026 tokens; smaller prefixes of 50,011 and 29,993 tokens ran once each. Resume after expiry, modelled with an unseen prefix and a one-hour cache write, versus a keep-alive ping then a warm resume.

Baseline complete-task cost − feature-on complete-task cost
We aim to report alongside: net API cost per completed task · task pass rate

The result.
With its boundaries.

Results are copied from our lab reports (snapshot 27 Oct 2026) and were not re-run for this website.

Lab+$0.3597Net saved per resume after 1 hour idle (1 ping; Sonnet 5.5, 100,026-token prefix, cold arm modelled)
Lab90%Cheaper resume after 1 hour idle with keep-alive (Sonnet 5.5, 100,026-token cached prefix; the cold resume is modelled: $0.4004 vs ping + resume $0.0408)
Lab$0.0204Cost of a chain nobody resumes after 1 hour (1 ping), nothing saved
Lab5%Share of idle chains that must end in a resume for the pings to pay off after 1 hour (2 hours: 11%, 3 hours: 16%)
Read this alongside the figures. A ping nobody follows costs money and saves nothing. Cache: how often people come back after an hour or more was not measured; the break-even shares say how often they must.
ExperimentWorkload and dateResultLimitsReport
Keep-alive cost study

5 repetitions at 100,026 tokens; smaller prefixes of 50,011 and 29,993 tokens ran once each

26 Oct 2026

90% Cheaper resume after 1 hour idle with keep-alive (Sonnet 5.5, 100,026-token cached prefix; the cold resume is modelled: $0.4004 vs ping + resume $0.0408)

+$0.3597 Net saved per resume after 1 hour idle (1 ping; Sonnet 5.5, 100,026-token prefix, cold arm modelled)

85% Cheaper resume after 2 hours idle (2 pings, net +$0.3392)

80% Cheaper resume after 3 hours idle (3 pings, net +$0.3188)

$0.0204 Cost of a chain nobody resumes after 1 hour (1 ping), nothing saved

5% Share of idle chains that must end in a resume for the pings to pay off after 1 hour (2 hours: 11%, 3 hours: 16%)

Cache: the one-hour expiry was not waited out; the cold resume is a never-seen prefix, which bills the same full cache write.

Cache: how often people come back after an hour or more was not measured; the break-even shares say how often they must.

docs/evals/2026-10-26-cache-keepalive.md

Lab results at Anthropic API list prices on fixed tasks show what a lever did on those tasks, not what it will do on your bill. For plugin levers on Pro or Max, list-price values describe usage economics, not the subscription invoice. Relay levers apply to API keys only.

Read the measurement method and evidence limits
Is this a production savings guarantee?

No. Lab figures describe fixed tasks and settings. Read the quality outcomes and limits next to each result.

Where can I inspect the evidence?

The workload, date, uncertainty and report name are in the table above. The repository is private, so there are no source links, and customer data is never included.

A little more care.
A clearer picture.

Add Tokensitter to Claude Code and see where your tokens go.

Add to Claude CodeOpenAI Codex: coming soon