cd /news/artificial-intelligence/token-arbitrage-use-sol-for-coding-l… · home topics artificial-intelligence article
[ARTICLE · art-84677] src=dirac.run ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Token Arbitrage: Use Sol for coding, Luna for compaction, save 84%

OpenAI's price drop for Luna unlocked a cost-saving technique: using Luna for context compaction instead of Sol reduces compaction costs by 84.5%, from $0.40 to $0.062 per compaction event, according to a developer who implemented the feature in Dirac. The savings stem from Luna's lower input and output token prices, and the approach is now supported in Dirac via a new 'Utility model' concept.

read2 min views1 publishedAug 3, 2026
Token Arbitrage: Use Sol for coding, Luna for compaction, save 84%
Image: source

The recent Luna price drop unlocked some neat uses for OpenAI users such as scout, test writer, test maintainer, trigger executor, and many more. We will specifically focus on context compression in this post.

Suppose you are running a fairly long agentic loop that has a compaction threshold around 200k tokens and compaction triggers 5 times during the full loop. Each time, let’s say the compaction generates ~10k tokens (20:1 compaction ratio). Somewhere between 8 to 12% of the total cost of such a loop will be solely from compaction, easily making it the most expensive tool call per invocation, largely due to the large token output that necessarily has to be generated each time.

Condense operations are essentially summarization operations with some trivial constraints. They primarily need to preserve task state: the objective, repository findings, files changed, commands and tests run, failures encountered, decisions made, and unresolved work. Once a model reliably extracts those fields, additional general reasoning capability is unlikely to produce any measurable improvement in the summary. (source: arXiv 2606.02875 + many similar results)

Scenario A: Sol condenses its own context

200k × $0.50/M (cached input price) + 10k × $30/M (output + reasoning tokens emitted for condense) = $0.10 + $0.30 = $0.40

Scenario B: The harness detects the condense threshold and hands the work over to Luna.

200k × $0.25/M (cache write price; Luna does not benefit from read cache) + 10k × $1.20/M (output + reasoning

tokens emitted for condense) = $0.05 + $0.012 = $0.062 Compared to Sol, just swapping in Luna for compaction saves:

1 − ($0.062 / $0.40) = 84.5% This is a comparison solely between Sol and Luna; if you use something like DeepSeek V4 Flash, the savings would be even larger.

If you work exclusively in long-context loops, assuming context compaction is a 10% overhead cost, this change alone reduces your overall bill (or saves usage limit) by 8.4% with no regressions.

Now supported in Dirac #

Dirac already supported a separate model for Plan mode and Act mode. This was a special case since this is neither plan nor act, so I added a new concept of Utility model (well, the concept itself is not new; multiple agents out there already support a similar concept). Then, when the compaction is triggered at the configured context limit, the harness routes this through the utility model and the main model starts its next response with condensed context.

Another advantage, of course, was to start reusing this in multiple other things such as task creation tooling, generating the commit message automatically, and so forth.

If you want to push it to the limits #

Notice that we used $0.25/M input price earlier for Luna, which is a cache write price. This content is strictly one-off, so it can be called with cache writes disabled, saving you one whole cent per call!

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @openai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/token-arbitrage-use-…] indexed:0 read:2min 2026-08-03 ·