XCR

Guides

How to make AI coding cheaper: 8 ways to cut token usage

Updated

Short answer

Most AI coding spend goes on context: the model re-reading your conversation and files on every turn. Keep sessions short, attach only the files that matter, match the model to the job and plan before you build. Then move the heaviest part, multi-file implementation with test-fix loops, to a pay-per-task service like XCR.

Where your tokens actually go

Every turn of an AI coding session sends the model the conversation so far, the files it has opened, your project rules and the definitions of every tool it can call. Output is often the smaller part. That's why a long session gets more expensive with every message, and why an agent that loops through "edit, test, fix" can burn through a plan's limit in an afternoon.

1. Start fresh for each task

Old context rides along with every new message. Start a new session or run /clear (Claude Code) when you move on to an unrelated task.

2. Compact long sessions

If you must keep going, summarize. Claude Code's /compact shrinks the history while keeping the key decisions.

3. Keep project rules short

CLAUDE.md, AGENTS.md and Cursor rules load on every request. A tight page of the rules that actually matter beats a long wiki.

4. Point at the right files

"Fix the date filter in orders/export.ts" is far cheaper than "fix the export bug", which makes the model search your repo first.

5. Match the model to the job

Use the strongest model for architecture questions and nasty bugs. Routine edits, renames and boilerplate run fine on lighter models that cost a fraction as much.

6. Plan before you build

Ask for a short plan, correct it, then let the tool build. One clear brief beats five rounds of "actually, also…".

7. Trim tool overhead

Each MCP server and tool adds its description to the context. Disable the ones you don't use in a project.

8. Delegate the implementation

The biggest single cost in AI coding is implementation: reading the codebase, writing changes across files, running tests and fixing failures. That's exactly the work you can hand to a specialist.

Subscription or pay-as-you-go?

Subscriptions are great when your usage is steady. If you code in bursts, a pay-per-task service means you pay for the work you actually do and nothing in quiet weeks. You also get a clear price per task instead of a limit that's hard to predict.

Hand the heavy lifting to XCR

XCR is a free plugin that works like an AI switchboard for your AI coding tool. It plugs into Claude Code, Codex, Cursor and Grok Build, and takes over the expensive part of the job:

  1. Your tool hands the task over. When a request needs more than a small edit (roughly more than 30 lines, or more than one file), it goes to XCR first.
  2. XCR does the build. It reads the repository itself, writes the change on a copy of your project, runs your project's own checks (type check, lint, tests) and repairs failures within the task budget.
  3. You get a short report. Requirements done, files changed, check results and the exact cost.
  4. Your tool reviews and wraps up. It checks the change against your request and finishes anything that needs the internet, such as installing packages.

XCR routes each task to models from OpenAI, Anthropic and Google, so one account covers all of them. Small edits and quick questions stay in your tool, exactly as before.

Pricing: model cost plus 20%, plus $0.02 per task. Credit packs of $5, $10, $25 or $50. No subscription. In our 22-task self-test sample, XCR and GPT-6 Astra each completed 19 tasks, and XCR's estimated cost was 41.8% lower.

Want the limits explained tool by tool? Read the guides for Claude Code, Codex and Cursor, or see XCR pricing.

Pay for the work, not the subscription.

Install the free plugin and pay per task: model cost plus 20%, plus $0.02 per task.

Install XCR free →

Questions

What is the cheapest way to do AI coding?+

Keep context small, use lighter models for routine work, and pay for heavy implementation only when you need it. XCR charges model cost plus 20% and $0.02 per task, with no subscription.

Do I still need my AI coding tool?+

Yes. XCR plugs into Claude Code, Codex, Cursor or Grok Build. Your tool keeps the conversation and the review; XCR takes the implementation.

How do I control spending with XCR?+

Each task has a budget, and you can set a daily limit per computer. Credit packs are prepaid ($5, $10, $25 or $50) and never renew automatically.

Where does the 41.8% figure come from?+

From our published 22-task self-test sample, where XCR and GPT-6 Astra each completed 19 tasks and XCR's estimated cost was 41.8% lower. The full report lists every task.

More guides

All guides