Founder pricing: Pro at $9.99/mo forever for the first 50 members. 18 of 50 left Claim yours →
All posts

How to cut AI coding agent token costs without cutting scope

The SanuDesk team 5 min read
cost tokens ai agents

It's 2pm and you're locked out. Or the API dashboard shows a number you'd rather not explain. Either way the feeling is the same: you didn't do anything unusual today, and somehow the meter ran.

Here's the uncomfortable part: most of what you paid for wasn't code. It was the agent working out where things are, forgetting, and working it out again.

The tokens go somewhere you're not looking

It's natural to assume the cost is the output: the 300-line diff, the tests, the explanation at the end. It usually isn't. Output is small. Input is what bills.

Every turn, the agent re-sends the accumulating conversation: every file it opened, every command output, every wrong guess. A single question late in a long session can cost many times what the same question cost at 9am, because it now drags an entire morning behind it.

So the fix isn't "prompt less." It's cutting the work that produces no value: rediscovery, repetition, and building things you were always going to reject.

Stop paying it to rediscover your own repo

Every session starts from zero. The agent greps, opens a dozen files, follows a dead end, and eventually finds the thing you could have named in four words. You pay for that archaeology every single time.

Two habits kill most of it.

Name the file. "The rate limiter is in app/Http/Middleware/Throttle.php" costs you a line and saves fifteen tool calls. Being specific isn't hand-holding; it's the cheapest instruction you can give.

Write the standing context down once. Conventions, the test command, the folders that are off-limits, put them in an AGENTS.md file instead of re-explaining them in every session. One file read beats ten files guessed at.

Short sessions are cheap sessions

The single biggest cost lever is also the least intuitive: finish things and start fresh.

A four-hour session isn't one task. It's eight tasks sharing one very expensive transcript, where task eight pays to carry task one's dead ends. That's also why quality drops as sessions run long: the context window fills with noise, and you're paying premium rates for a degraded conversation.

When a task is done, close it. New task, new session, minimal context. You'll spend less and get better answers, which is a rare combination.

Make it plan before it builds

The cheapest tokens you'll ever spend buy a plan you reject.

Before anything large, ask for the approach: files it will touch, the shape of the change, what it will not do: ten bullets, no code. Rejecting that costs you a paragraph. Rejecting a finished implementation costs the implementation, your review of it, and the rebuild.

This is the whole economic argument for spec-driven development: being specific up front is not bureaucracy, it's the discount.

Right-size the model

Not every task deserves your most expensive model. Renaming a symbol across forty files, scaffolding test boilerplate, updating a changelog, mechanical migrations: a smaller, faster model does these fine, and does them quicker.

Save the heavy reasoning for what actually needs it: architecture, gnarly debugging, refactors where being wrong is expensive.

Being honest about the limits here: switching models halfway through a confused session doesn't rescue it. Choose at the start of a task, not in the middle of a mess.

Cheap is not the goal

You can drive token spend to zero by not using an agent. That's not a win, and any advice that optimises purely for fewer tokens is pointing at the wrong number.

The number that matters is cost per shipped change. Some spending clearly pays for itself:

  • Running agents in parallel costs more tokens and much less of your day.
  • A screenshot or test loop costs extra turns and prevents an entire redo.
  • Reading the code before editing it costs input and avoids inventing an API that doesn't exist.

Cut repetition. Keep verification. And if you're on subscription plans rather than metered API keys, the same habits apply: you're rationing usage limits instead of dollars, but the leaks are identical. What goes for dollars goes for hours, too: the same two-column honesty tells you whether your agents make you faster at all.

Where SanuDesk fits

Most of the waste above is really an organisation problem: work that isn't scoped, sessions nobody closes, agents quietly spinning while you're in another window.

SanuDesk is the desk that makes those visible. Your Claude Code, Codex and Gemini sessions tile into one grid, so a stuck agent is something you see in five seconds rather than discover twenty minutes and a lot of tokens later. The Kanban board holds the brief instead of your working memory: write the scope once, deploy the card to an agent, review what comes back, and start the next one in a clean session. Loops handle the recurring jobs to a fixed brief, so the weekly chores stop being re-typed from scratch every time.

It runs on the agent subscriptions and API keys you already have: bring your own model, your provider bills you directly, no second meter in between. The free tier is a real one.

Try it on this week's spend

Pick your next task. Name the files, ask for a plan before code, and close the session when it's done. Three habits, no scope cut.

Download SanuDesk free and point a workspace at your repo, or see how the grid, the board and Loops fit together on the features page.

Run your own fleet of agents

SanuDesk is a free desktop app that tiles your Claude Code and Codex sessions and gives every project a Kanban board your agents work from.