What you pay for when your AI comes back to a project
Codelux AI does not promise a saving. This page explains how an AI tool's prompt cache works, what each provider says about it, what Codelux AI does about it, and where the app shows you the real tokens of your own sessions.
What the prompt cache is, in plain words
Your AI resends the whole conversation at every step, because the model keeps nothing in between. To make that cheaper, providers keep the part that repeats in a short-lived cache and bill it at a fraction of the normal input price. The cache expires when you stop for long enough, and anything that changes the start of the conversation (another model, different tools, an edited instructions file) resets it. That is why the same work can cost very different amounts depending on when you resume, and why a token count and a cost do not move together. Codelux AI does not change how a provider's cache works: it keeps the section it writes in your project files identical in every session, so that section never resets the cache.
The three moments that matter
| Moment | What the provider still has in cache | When it happens |
|---|---|---|
| Cold | Nothing | You come back the next day, after the cache has expired |
| Warm-up | Only the fixed start Claude Code shares between sessions | A new session soon after another one |
| Hot | The whole conversation | You resume before the cache expires (1 hour on a Claude subscription) |
How each AI tool's cache works
Codelux AI does not change how a provider caches. This is the providers' published behaviour, as read in their documentation in October 2026: it can change, so check the vendor's page before relying on a duration. Not documented means the vendor does not say. How Codelux AI connects to each tool is on Works with.
| AI tool | What the provider documents | Codelux AI does |
|---|---|---|
| Claude CodeAnthropic | Entries last 5 minutes by default; the main conversation uses 1 hour on a Claude subscription within the included usage (5 minutes with API keys or extra-usage credits). Sub-agents and helper tasks use 5 minutes. Cache reads are billed at a fraction of normal input and writes at a premium. Changing the model, the tools or the start of the conversation resets it. How cached tokens count against subscription limits: not documented. | With the plugin, it predicts at session start whether the cache is cold, warm-up or hot, and sends the full memory or only what changed. The Usage page and the Timeline show each session's cache, read from Claude Code's own log. |
| CodexOpenAI | With the OpenAI API, caching of the start of the prompt is automatic and cached input is billed at a discount. Entries are short-lived and last longer on some models; see OpenAI's documentation for the model you use. With a ChatGPT login: not documented. | Sends the memory in full, because Codex does not report its cache state to hooks. Usage is read from Codex's own session records on your computer. |
| Gemini CLI | With a Google login the CLI creates no cache, per its documentation. With an API key or Vertex AI, caching is automatic on recent Gemini models; how long it lasts: not documented. | Sends the memory in full. Usage is read from Gemini CLI's own session files on your computer. |
| Cursor | Duration not documented by Cursor. Usage is priced at the model's API rates. | Memory and notes through the MCP connection. Cursor writes no usage records on your computer, so the app cannot show its tokens or its cache. |
| OthersVS Code, Windsurf, JetBrains, Zed… | Depends on the model provider each one uses; many do not document it (not documented). | Memory and tools through the MCP connection. No cache state is shown for them. |
What Codelux AI does about it
We make no claim about how many tokens or how much money this saves you: it depends on your project, your AI tool, your model and how long you wait between sessions. These are the mechanisms, and the app shows you the result on your own work.
Memory and index on your computer
The project memory, the notes and the code index are kept on your computer. They are what your AI reads when it comes back, instead of studying the project again from nothing.
Code points checked by hash
When a session ends, the AI saves its notes, and Codelux AI remembers exactly which pieces of code they refer to. At the next start Codelux AI checks each piece against the real file. Unchanged: the AI can trust it as if it had just read it. Changed: it gets only the new lines. Gone: it is told so. The AI re-reads only what could not be confirmed.
It notices the state of the cache
With the Claude Code plugin, Codelux AI reads at session start what Claude Code reports (how long since the last answer, whether the cache has probably expired) and predicts cold, warm-up or hot. A new session gets the full memory; a conversation resumed while the cache is hot gets only what changed; after a long pause or a compaction it gets the code points and the last conclusions. The first line it adds says which case it is.
A block that never changes
The short section Codelux AI keeps in AGENTS.md (and CLAUDE.md if you have one) carries no date and no status, so it is identical in every session and never invalidates a provider's cache.
What “unchanged” does not guarantee
The check covers the piece of code itself, not the code it calls. If something it depends on changes, the piece is still “unchanged” but a conclusion built on it may no longer hold. That is why saved facts are also flagged when the code under them changes.
Subscription limits
How much cached tokens count against a subscription's 5-hour and weekly limits is not documented by the providers, so we say nothing about those limits.
The numbers are yours
We publish no token or cost figure of our own. The app measures where it happens, from the records your AI tools already write on your computer, and no provider login is used.
The Usage page
Tokens per day, per task and per tool and model, with input, output and cache shown separately, and the cost at the provider's list price. For Claude Code, Codex and Gemini CLI.
The Timeline
Each agent session shows whether the provider's cache was cold, lukewarm or warm when it started, the share of the work the cache covered, and how many times it restarted from zero and what rewriting it cost at list price.
Compare on your own work
Work as usual for a few days and read the page. If a tool writes no local records, as Cursor and Copilot do not, the app says so instead of guessing.
Check it on your own project
Free covers one project with every feature, no time limit and no card.