← The Wire

Public story · 2026-06-30 · high

Minifying code cuts AI agent tokens 42%

The catch: stripping code first costs 12 points on SWE-bench Verified accuracy, per a new arXiv paper.

Why now: The paper posted to arXiv in June and its code is already public on GitHub, so teams running agents over large repos can test the tradeoff themselves right now.

Confidence
high
Sources
1
Redaction
passed

Story

Minifying code cuts a coding agent's input tokens 42% on average, according to a paper posted to arXiv in June. For agents that read whole repositories into context, that's real savings on cost and latency without touching the model itself. It comes at a price: accuracy on SWE-bench Verified drops 12 points when the code gets stripped down first.

The paper's case is that source code, not conversation history or tool output, is the dominant token sink for agents that keep full repo state in context. Minification strips non-essential lexical elements, things like whitespace and dead syntax, while preserving semantics, so the agent still sees working code, just less of it. The code behind the paper is public on GitHub.

I'd skip minifying the whole repo. The smarter move strips only the files an agent reads for context and leaves the ones it's actually editing untouched, since that's probably where the 12-point accuracy hit lands hardest. Worth watching whether anyone publishes numbers on selective minification instead of the blanket version.

The paper posted to arXiv in June and its code is already public, so teams running agents over large repos can test the tradeoff themselves this week.

Related stories

Each link below shares sources, entities, or timing with this story.

  1. Shared entities / Shared topic / Earlier coverage / Tension

    A 27B Model Just Matched the 400B One. It Fits on Your Laptop.

    Both cover GitHub, SWE, Verified; overlapping topics (code, coding, cost, token); earlier GitHub coverage from 2026-04-23.

  2. Claude Sonnet 4.6 Drops — Opus-Class Performance at One-Fifth the Price

    Both cover SWE, Verified; overlapping topics (code, coding, cost, drop, token); earlier SWE coverage from 2026-02-17.

  3. Shared entities / Shared topic / Earlier coverage

    Devstral 2 is open source, 123B params, hits 72.2% SWE-bench, and costs a seventh of Sonnet

    Both cover GitHub, SWE, Verified; overlapping topics (agent, coding, cost); earlier GitHub coverage from 2026-06-02.

  4. Berkeley Researchers Score 100% on SWE-bench Verified Without Solving a Single Task. Every Major AI Benchmark Is Broken.

    Both cover GitHub, SWE, Verified; overlapping topics (agent, code, coding); earlier GitHub coverage from 2026-04-12.

  5. Shared entities / Shared topic / Earlier coverage / Tension

    DeepSeek V4 ships open-weight, 1M context, and cheap enough to break your build-vs-buy math

    Both cover SWE, Verified; overlapping topics (coding, cost, token); earlier SWE coverage from 2026-06-15.

  6. MiniMax M2.5 Matches Frontier Coding Performance at 5% of the Cost.

    Both cover SWE, Verified; overlapping topics (code, coding, cost); earlier SWE coverage from 2026-03-18.

  7. Shared entities / Shared topic / Earlier coverage

    An Open-Weight Model Just Beat Opus 4.6 and GPT-5.4 on the Hardest Coding Benchmark. MIT Licensed.

    Both cover GitHub, SWE; overlapping topics (agent, coding, cost, have); earlier GitHub coverage from 2026-04-09.

  8. Shared entities / Same source domain / Shared topic / Earlier coverage

    Review Beats Planning: Dual-Model Interaction Achieves 90.2% Pass@1 for Code Synthesis

    Both cover SWE, Verified; reported by the same outlet (arxiv.org); overlapping topics (code, coding).

Source trail

Entities

Claim evidence

  1. Minifying code cuts AI agent tokens 42%

Provenance

Canonical issue
2026-06-30
AI generated
yes
Story unit
2026-06-30-minify-source-before-feeding-it-to-a-coding-agent-to-cut-input-tokens-42
Labels
source-backed, canonical briefing excerpt