Low-token coding agents: what makes one cheap to run
A coding agent pays for every token it sends the model, on every turn: its own instructions, your memory files, the tool list, the conversation and the files it read. A low-token agent keeps that pile small and stable. It keeps its own instructions short, loads memory only when a task needs it, and leaves a prefix the provider can cache, so the same model does the same work for fewer tokens.
Updated 2026-11-27
Where a coding agent’s tokens go#
Each turn, the agent sends the model everything it needs to answer. Most of it is the same from turn to turn:
- Its own instructions: the system prompt that tells the model how to edit, when to ask and how to use tools. Some agents ship thousands of words here.
- Your memory files:
CLAUDE.md,AGENTS.mdor the agent’s own notes file, loaded whole on every turn. - The tool list: every tool’s name, description and schema, including every MCP server you added.
- The conversation: your messages, the model’s replies and every file and command output it has read, until the agent compacts it.
Only the last part is the work itself. The first three are overhead you pay again on every turn, so they are where a low-token agent saves.
What makes an agent low-token#
| Choice | Why it saves tokens |
|---|---|
| Short built-in instructions | Less fixed text before your task on every turn. |
| Memory that loads on demand | A small core loads every turn; the rest loads only when a task asks for it. |
| A stable prefix | Providers cache a prefix that does not change, and a cached read costs a fraction of a fresh one. Text that changes every turn breaks the cache. |
| Few, focused tools | Every tool description is sent every turn. Fewer, clearer tools cost less and confuse the model less. |
| Reading before editing, in small pieces | Searching and reading only the lines it needs keeps file contents out of the conversation. |
| Your choice of model | The same work on a smaller or open model costs less. A low-token agent makes a smaller model usable because the model’s attention goes to your code, not to the agent’s own text. |
How MinniCode does it#
MinniCode is the low-cost, open-model coding agent from Minni Labs, for the terminal. It applies the same memory layout as MinniMemoryMCP to itself.
- Its own instructions stay short, and the rest of what it knows loads only when a task needs it.
- Your project’s
MINNI.mdnotes load every turn. When they grow long,/memory applysplits them: a short core stays loaded and the rest loads only when a task needs it. - Any model on your own key: NVIDIA or OpenRouter, free ones included, your Claude subscription through Claude Code, or a local model through Ollama or LM Studio. Requests go straight from your computer to the provider.
- You choose how much it asks: before each edit and command, or in auto mode only before pull requests and merges.
What we measured: on the same tasks, a warm MinniCode session wrote 5,286 tokens to the model’s cache against 8,273 for Claude Code, 36% less. The method is on the evidence page.
# Windows, in PowerShell
irm https://minniai.com/install | iex
# macOS and Linux
curl -fsSL https://minniai.com/install | shKeeping the agent you have#
If you stay on Claude Code or Codex, the memory part of the saving still applies: MinniMemoryMCP splits your memory files the same way. The other levers are in How to reduce Claude Code token usage and How to reduce Codex token usage. Other open-model agents are compared in Open-LLM coding agents compared.