← Back to Blog Cost Guide

7 Mistakes That Waste Tokens in AI Coding

Last updated: July 2026

Most wasted tokens come from a few repeatable habits: pasting whole files and logs into the prompt, padding prompts with filler, never clearing context so one session grows every turn, letting the agent explore blindly, and using frontier models for routine work. Each one re-sends tokens you never needed — here is the fix for all seven.

If you keep asking "why am I wasting tokens?", the answer is almost never a single leak — it is a handful of small habits that each re-send unnecessary tokens on every turn. Below are the seven most common mistakes, why each one costs real money, and the concrete fix. A few of them Terse catches for you automatically.

Table of Contents

  1. 1. Pasting Entire Files and Logs Into the Prompt
  2. 2. Verbose, Over-Polite Prompts
  3. 3. Never Clearing or Compacting Context
  4. 4. Letting the Agent "Explore the Repo" Blindly
  5. 5. Frontier Models for Routine Work
  6. 6. Ignoring Prompt Caching
  7. 7. A Bloated Instruction File
  8. FAQ

Before the list, one mechanic explains why these mistakes hurt so much. Most AI coding agents re-send the accumulated context on every turn — your prompt, the files in context, the chat history, and every tool result. So a token you waste early is not paid once; it is paid again on every following turn. That is the thread running through all seven mistakes. If you want the full picture, our breakdown of AI coding agent costs quantifies how per-turn re-sends dominate a real session.

1 Pasting Entire Files and Logs Into the Prompt

Why it costs tokens: When you paste a 2,000-line file or a full 500-line stack trace into the chat, every token of it enters the context — and thanks to per-turn re-sends, it rides along on every subsequent turn. A single pasted log can add 4,000-8,000 tokens that get billed a dozen times before the task is done. Worse, most of it is noise the model never reads.

The fix: Reference, don't paste. Point the agent at the file by path and let it read the exact lines it needs, or paste only the relevant 10-20 lines of a log — the error and a little surrounding context. Modern agents are good at pulling a file on demand; feeding them the whole thing up front just pays for tokens they would have skipped.

2 Verbose, Over-Polite Prompts

Why it costs tokens: "Hi, I hope you're doing well. I was wondering if you might possibly be able to help me with something, if that's okay?" is a lot of tokens before you have said anything. Filler, hedging, restated requirements, and polite preambles all add tokens the model does not need — and because the prompt is carried forward with the history, you pay for that padding on every turn, not just once.

The fix: Say what you need, plainly. Drop the preamble, the "please and thank you," and the throat-clearing. Concise, specific prompts cost less and, as a bonus, produce more focused output. This is exactly the layer Terse targets: it strips filler and politeness on-device before the prompt is sent, so the compression happens automatically. Our guide on how to write prompts that use fewer tokens goes deeper on the wording patterns that quietly inflate a request.

3 Never Clearing or Compacting Context

Why it costs tokens: This is the biggest single waster. Running one endless session — dozens of unrelated tasks in a single conversation — means the entire history is re-sent on every turn. A file you read on turn 3 is still being billed on turn 40. By the end of a long session, you are paying to re-transmit a small novel's worth of stale context with every message.

The fix: Clear the context when you switch tasks, and compact it when a session gets long. Most tools have a clear/reset command and many now offer an automatic compaction step that summarizes the history into a fraction of the tokens. Treat each distinct task as its own session. Our guide on reducing the Claude Code context window walks through exactly when to clear versus compact.

4 Letting the Agent "Explore the Repo" Blindly

Why it costs tokens: An under-specified task sends the agent wandering. It greps, reads files it does not need, opens directories to "understand the structure," and each of those reads dumps tokens into the context that then ride along on every following turn. A blind exploration of a large repo can burn tens of thousands of tokens before a single line of useful work happens — and agents often re-read the same file twice because they lost track of it.

The fix: Point it at the right files. Name the two or three files that matter in your prompt. If you know the function, say so. Scoped instructions cut the exploration phase to almost nothing. Terse helps here too — its agent monitor flags redundant reads and duplicate tool calls, so you can see when an agent is re-reading the same file or repeating a search it already ran.

5 Frontier Models for Routine Work

Why it costs tokens: Strictly this wastes money rather than tokens, but the effect on your bill is identical. Frontier models like Claude Opus or GPT-5 are priced many times higher per token than a solid mid-tier model. Using them to rename a variable, fix a typo, format a file, or write a small test means paying a 5-15x multiplier for work a cheaper model does just as well. On a large context, that multiplier hits every token you send.

The fix: Match the model to the task. Reserve frontier models for genuinely hard reasoning and architecture; use a cheaper, faster model for the routine 80% — edits, boilerplate, small tests, refactors. Many tools offer an "auto" mode that picks an efficient model for you. Do not leave a frontier model pinned as your permanent default.

6 Ignoring Prompt Caching

Why it costs tokens: If your provider supports prompt caching and you are not using it, you are paying full price to re-send the same stable prefix — system prompt, instructions, a large reference file — on every request. Cached tokens are billed at a steep discount (often 90% off on cache hits), so ignoring caching on a repeated, unchanging prefix is money left on the table every single turn.

The fix: Structure your context so the stable parts come first and enable caching where the platform offers it. Keep the unchanging system prompt and reference material at the front of the context and let the volatile, per-turn content trail it, so the cache prefix stays intact across requests. For most agent tools this is a setting or a code-level flag on the request — worth checking, because the savings compound over a session.

7 A Bloated Instruction File

Why it costs tokens: Your CLAUDE.md, .cursorrules, or equivalent instruction file is loaded into context at the start of every session — and then re-sent on every turn of that session. A 3,000-token file of accumulated rules, examples, and "don't do this" notes becomes a fixed tax on every request you ever make. Most of these files grow by accretion and are never pruned, so you are paying to re-send guidance the model rarely acts on.

The fix: Keep the instruction file lean and high-signal. Trim rules that never fire, cut long examples the model already infers, and move rarely-needed detail into referenced docs the agent can pull on demand instead of loading every time. A tight instruction file is one of the highest-leverage cuts you can make, because it is paid on literally every turn of every session. Our primer on what token optimization is covers the trade-off between always-loaded context and on-demand references.

Catch the Waste Automatically

Terse strips filler and politeness from your prompts on-device, and its agent monitor flags redundant reads and duplicate tool calls in real time — so several of these mistakes get caught before they cost you. Zero latency, no API calls.

Try Terse

Frequently Asked Questions

Why am I wasting so many tokens in AI coding tools?

Most wasted tokens come from a handful of habits: pasting entire files and logs into the prompt instead of referencing them, verbose over-polite prompts, never clearing context so one endless session grows every turn, letting the agent explore the repo blindly, and using frontier models for routine work. Each one re-sends unnecessary tokens on every turn.

What is the single biggest token waster?

An endless session that never gets cleared or compacted. Because most agents re-send the full accumulated context on every turn, a single early file dump gets billed dozens of times over a long session. Clearing or compacting context between tasks is the highest-leverage fix.

Do verbose or over-polite prompts actually cost more tokens?

Yes. Filler, hedging, and polite preambles add tokens the model does not need, and because the prompt rides along with the accumulated history on every subsequent turn, a padded prompt is paid repeatedly, not once. Concise prompts cost less and tend to produce more focused output.

How do I stop wasting tokens without changing tools?

Reference files instead of pasting them, write concise prompts, clear or compact context between tasks, point the agent at the right files, use a cheaper model for routine work, enable prompt caching where available, and trim your instruction file. Terse also catches filler and flags redundant reads and duplicate tool calls automatically.

Further Reading

Related articles

How to Reduce Your Claude Code Context Window How to Reduce Your Cursor Costs How to Reduce GitHub Copilot Costs