Part of the reduce AI coding agent token usage pillar. This page is Cline-specific: the built-in controls, what they cover, and where they stop.
See also:
How do you reduce Cline token usage?
Write a.clineignore before anything else, plan in Plan mode instead of Act, and understand that Auto Compact is a recovery mechanism rather than a saving — then fix the real driver, which is how much of your project enters the conversation in the first place.
Cline is bring-your-own-key. There's no subscription absorbing the difference between a lean session and a wasteful one: the API bill is yours, line by line. That makes it one of the agents where the levers below pay off fastest, and one where the defaults cost you the most.
Why does Cline burn tokens?
Because without an ignore file it will load your project — dependencies, build artifacts and generated files included — and because everything it loads is re-sent on every subsequent turn. Cline's own documentation puts a number on the first half of that. Adding a.clineignore can cut your starting context "from 200k+ tokens to under 50k". Read that again: the starting context, before you've asked for anything. A node_modules tree, a dist/ folder and a few generated clients are enough to spend six figures of tokens on material no model needed.
The second half is what turns that into money. The model is stateless, so turn twenty re-sends turns one through nineteen. A 150k-token surplus at the start isn't paid once; it rides along, and long tasks pay for it repeatedly. This is why context bloat compounds rather than adds, and why the cheapest token is the one that never entered.
Which built-in controls actually help?
Three, and they solve genuinely different problems — it's worth being clear about which..clineignore— keeps files out of what Cline loads automatically. Same pattern syntax as.gitignore:node_modules/,**/node_modules/,*.csv,/build/,*.env.*, with!important.csvas an exception and#for comments. This is the single biggest lever available and it takes five minutes. One caveat that matters: Cline's docs now mark it deprecate soon. It was never an access boundary — ignored files can still be read through explicit@mentions or shell commands — and the team says they're moving away from it as a supported feature. Use it today, because today it works; don't build a strategy around it lasting.- Plan mode — Cline's two modes are not a UI preference. In Plan mode it can read your codebase, search and discuss, but it cannot modify files or execute commands. Exploration there avoids the edit-retry loops and the write-path tooling that inflate a session before you've decided what to change. The conversation carries over when you switch to Act, so nothing is repeated.
- Different models per mode — Cline ships a "Use different models for Plan and Act" setting, and its own docs give cost optimisation as the first example use case. Reasoning during planning, something cheap and fast during execution. Being model-agnostic only saves money if you actually use it, and this is the setting that makes using it automatic instead of a decision you have to remember.
/deep-planning for tasks that span multiple files or sessions, and checkpoints, which let you roll back to before a summarisation instead of losing the state.
What does Auto Compact actually cost you?
Less than you'd fear on the turn it runs, and more than you'd think on every turn after. Auto Compact watches token usage and, as you approach the model's context limit, writes a comprehensive summary, replaces the conversation history with it, and continues. It replaced an older behaviour that simply truncated old messages and lost the context in them, so as a correctness feature it is a clear improvement. The docs are also straight about the immediate cost, and they're right: summarisation reuses the prompt cache already built from the conversation, so the summarisation call itself costs roughly what any tool call costs. You're mainly paying output tokens to generate the summary. The part worth thinking through is what happens next. Providers cache on an exact prefix match, and replacing the conversation history with a summary is by definition a new prefix. The turns after a compaction are not reading the cache you spent the session filling — they're building a new one. If you were on Anthropic, where cache reads bill at roughly 10% of input, the discount you'd earned is gone and the next stretch of conversation re-establishes it at full price. None of that makes Auto Compact wrong. It's the right behaviour when you'd otherwise hit a wall. It just means compaction is what you do when reduction has already failed, not a substitute for it. And note the fallback: with models that don't support it, Cline reverts to rule-based truncation even when Auto Compact is enabled.What are the biggest levers for Cline specifically?
The ones that decide what enters the conversation, since everything after that is damage control.- Write the
.clineignorefirst. It's the only control here with a documented four-figure effect, and it costs five minutes. Dependencies, build output, generated code, lockfiles, large data files. - Explore in Plan mode. Read-only exploration is both cheaper and safer, and it costs nothing to adopt.
- Split models across modes. A stronger model for planning and a cheaper one for execution is a config change, not a workflow change.
- Audit what your tools contribute. Every tool and MCP server available to the agent occupies context whether or not it gets called. Servers you added once and never used are pure carry cost, paid on every turn.
- Keep tasks scoped. Cost grows non-linearly with task depth because each turn re-sends everything prior. Two focused tasks cost less than one that wandered, for the same work.
What goes wrong (anti-patterns)
Treating Auto Compact as the token strategy. It is a ceiling-handling mechanism. A session that compacts three times was expensive long before the first compaction. Ignoring.clineignore because it's being deprecated. The deprecation is about it not being an access-control boundary, not about the loading behaviour going away. Until something replaces it, the 200k-to-50k reduction is still on the table and you're paying for it if you skip it.
Adding MCP servers speculatively. They're cheap to install and permanently expensive to keep. Audit them the way you'd audit dependencies.
Reading the token counter once. Cline shows you what a task consumed. The distribution shifts as your codebase and habits change — it's a monthly five-minute check, not a one-off.
Can a tool do this automatically?
The levers above are all manual, and the ones that matter most — targeted retrieval instead of whole-file reads, filtering noisy command output, reading structure before implementations, loading MCP manifests lazily — have to be applied on every task to keep paying off. That's what Tokenade automates. It sits between the agent and its tools and applies them without rewriting conversation history behind the provider's cache, which is the distinction that decides whether a token tool helps or hurts. On the open token optimizer benchmark it cuts session cost by 39% on long sessions against running no tool at all.See also:
- Reduce AI coding agent token usage — the levers, tool-agnostic
- Reduce Cursor token usage — the same treatment for Cursor
- Reduce opencode token usage — and for opencode
- Best open-source AI coding agents — where Cline sits in the field
Ranked #1 on the Token-Harness Optimizer Leaderboard.
Tokenade ranks #1 in the Token-Harness Optimizer Leaderboard — an end-to-end benchmark of agent token optimizers measured on real coding sessions. Set it up once, it works on every prompt. Works with Claude Code, Cursor, Codex, Copilot & more.














