Skip to content
Arara Code

Guides and comparisons

How to reduce token usage when coding with AI

To spend fewer tokens when coding with AI, send only the context you need, reuse prefixes with prompt caching, use smaller models for simple tasks and open a new session for each task. In APIs, input and output tokens have different prices, and output usually costs more.

Arara Code

Published by the Arara Code project based on the official documentation cited.

Where token usage comes from

Providers charge per processed token, with separate prices for input and output, as the Anthropic pricing table shows. On plans with a usage limit, the same consumption exhausts the quota sooner.

In agents, each step resends the session history. That is why long sessions, with many terminal outputs and large files, consume far more than the initial request suggests.

Anthropic: model pricing

Prompt caching lowers the cost of repeated context

Prompt caching reuses the repeated prefix of a prompt. According to Anthropic documentation, cache reads cost 10% of the base input price; OpenAI applies automatic caching to prompts of 1,024 tokens or more.

To benefit, keep the start of the context stable: instructions, AGENTS.md and reference files first, and whatever changes at each step last.

Anthropic: prompt caching documentation

Lean context and the right model for each task

Reference only the files you need instead of pasting the whole repository, and ignore folders such as node_modules and dist. Summarize long terminal output before continuing.

Use smaller, cheaper models to rename, format and write simple tests, and keep the larger ones for architecture and hard bugs. Choose low reasoning effort when the task is straightforward.

OpenAI: prompt caching documentation

Controlling usage in Arara Code

Arara Code brings Claude Code, Codex, Kiro and Antigravity into the same editor and lets you switch platform, model and effort per conversation. When one agent hits its limit, continue the task in another.

Open a new conversation per task, keep fixed instructions in AGENTS.md and track your account limits in the chat usage meter.

Arara Code repository on GitHub

Sources and further reading

Read as Markdown

Keep exploring

Make room for your next idea.

Get to know Arara Code in your own project. Start with the installer and review the changes your assistant makes.