AI status

Event Published ResearchAnthropic

Paper Maps Which Token-Saving Tricks Actually Cut Costs for Claude Code

A new paper instruments a production gateway sitting between Anthropic's Claude Code and frontier models to measure which compression levers actually lower a session's token bill.

What happened

Published here

A paper submitted on 19 August 2026, titled An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents, instrumented a production compression gateway called Paritok placed between coding agents Claude Code and Codex and frontier models Claude Sonnet and GPT-5, then measured three separate token-saving levers under controlled A/B runs across real multi-turn sessions. (arXiv paper 2609.22114, An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents)

Editorial diagram showing paper maps which token-saving tricks actually cut costs for claude code
For a team paying per token to run a coding agent against Claude Sonnet, this changes which lever is worth building first: a fixed per-turn filter beats a compression scheme that looks impressive on a single-shot benchmark but adds re-send...

Open the photograph at full size

Photograph: Diagram: AI Journey

Read the full description of this diagram

Diagram drawn for this item: Paper Maps Which Token-Saving Tricks Actually Cut Costs for Claude Code. A paper submitted on 19 August 2026, titled An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents, instrumented a production compression gateway called Paritok placed between coding agents Claude Code... For a team paying per token to run a coding agent against Claude Sonnet, this changes which lever is worth building first: a fixed per-turn filter beats a compression scheme that looks impressive on a single-shot benchmark but adds re-send...

The numbers

Tool-schema filter

21K-57K

Tokens removed per turn by tool-schema filtering, a fixed block

Content compression

2%

Share of the cache-priced prefix saved per turn by content compression

Benchmark quality retained

86.5%

SWE-bench quality retained under the single-shot compression benchmark

Benchmark compression rate

25.7%

Compression rate paired with the 86.5% quality figure

Read from arXiv paper 2609.22114, An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents

What it means for you

For a team paying per token to run a coding agent against Claude Sonnet, this changes which lever is worth building first: a fixed per-turn filter beats a compression scheme that looks impressive on a single-shot benchmark but adds re-send costs once a session runs long.

In more detail

Researchers Luzhuo Chen and Jiayu Shi built a measurement rig around a production compression gateway, Paritok, that sits between coding agents and the frontier models answering them, including Anthropic’s Claude Sonnet reached through Claude Code, and separately through Codex against GPT-5. The stated aim was to check an assumption the field has largely taken on faith: that a compression scheme which scores well on a benchmark also saves money once it runs inside a real, multi-turn agent session.

The paper splits a session’s token bill into three independent levers and measures each in isolation with controlled A/B runs. Tool-schema filtering, which strips a fixed block of tool definitions every turn, removes 21K-57K tokens on a typical turn. Because it applies once per turn regardless of what happened earlier, the paper calls it the only lever that is unambiguously and reproducibly positive.

Content compression of file reads and tool output behaves differently. It saves only about 2% of the cache-priced prefix on the turn where it happens, but because compressed reads stay in the session history and get re-sent on every later turn, the saving compounds. The authors describe it overtaking the fixed tool-filter saving within roughly six turns, before the context window itself puts a ceiling on the effect. A non-destructive version of the gateway that lets the agent pull the original bytes back on demand keeps this bounded: each recall re-sends only the one segment that was compressed away, rather than triggering a larger repeat cost, though heavy recall use does spend back the accumulated saving one segment at a time.

The paper’s sharpest warning is aimed at how compression research gets cited. A single-shot compression benchmark built with the same gateway’s Paritok-4B model retains 86.5% of SWE-bench quality at a 25.7% compression rate, a strong result on its own terms. The authors are explicit that this figure describes compression quality in isolation and is orthogonal to multi-turn agent cost, and should not be quoted as evidence that a compression scheme saves money in production.

The numbers

The four figures above come from the paper’s own A/B measurements: the fixed 21K-57K token saving from tool-schema filtering, the roughly 2% per-turn saving from content compression that compounds over a session, and the 86.5% quality retained at a 25.7% compression rate on the separate single-shot benchmark that the authors say does not translate into a cost argument.

For anyone building or buying a Claude Code integration, the practical recipe the paper lands on is to fix the cheap, linear lever first and treat aggressive content compression as a workload-dependent bet rather than a default.

Sources

Sources read

Cite this

AI Journey, "Paper Maps Which Token-Saving Tricks Actually Cut Costs for Claude Code", 23 Sep 2026, https://aijourney.space/updates/2026-09-23-an-empirical-cost-attribution-of-context-compression-gateways-in-multi-t/ (source: arXiv, verified 23 Sep 2026)

Next in the stream

More in Anthropic

All Anthropic news