Agents In Use
What’s new todayLast update
11 use cases added today

How to cut Codex tool-output costs with compression

MattAlreadyHere reports a Hystax team's Codex CLI benchmark of deterministic, retrievable tool-output compression. Across 87 Terminal-Bench tasks, they report 22.7% lower provider costs and 25% fewer input tokens, with solve rate moving from 82.2% to 81.1%.

OUR ADAPTATION

Suggested prompt

Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.

Evaluate [coding agent] on the same fixed task set with and without [deterministic tool-output compressor]. Keep model and settings fixed. Preserve references to original output. Compare actual provider cost, prompt-cache use, input tokens, solve rate and failures. Report trade-offs rather than token savings alone.

Evidence at a glance

Sourced account
Source author
u/MattAlreadyHere
Original account
Read the source ↗
Published
Source link checked
Reported result
MattAlreadyHere reports 22.7% lower provider costs and 25% fewer input tokens across 87 Codex CLI benchmark tasks. Solve rate changed from 82.2% to 81.1%, described by the author as not statistically significant. Requests over 200,000 tokens fell from 1.9% to 0.13%. The results are not independently reproduced here.
Human involvement
The team built the compressor, selected the benchmark and analysed provider bills and solve rates. The source does not describe human review of each agent action. The author discloses employment at Hystax.

A linked account supports attribution. It does not mean we independently reproduced its result.

Report an issue with this caseOpen correction email

Opens your email app with the case link included. Nothing is sent automatically.

How the agent did it

  1. The team examined coding-agent traces and the cost of repeated tool-output history.
  2. They kept compression deterministic to avoid changing previously cached prompt prefixes.
  3. They retained distinct lines and replaced repeated output with labelled retrieval markers.

Reddit author MattAlreadyHere identifies themselves as a Hystax employee and describes their team's open-source compressor for coding-agent tool output. Their reported evaluation used Codex CLI with GPT-5.5 on 87 Terminal-Bench 2.1 tasks and real provider bills. This is a builder's benchmark account with an explicit commercial affiliation.

The problem was repeated build logs, warnings, test results and progress output returning in agent history. The team found that most input tokens in its runs were discounted prompt-cache reads. Compression that changed the same earlier output between turns could therefore break the cached prefix and raise costs. Their approach kept compression deterministic, retained at least one copy of each distinct line and replaced repeats with labelled markers.

The markers preserved references so the agent could retrieve original output by line range, JSON pointer or grep. The author reports 22.7% lower costs and 25% fewer input tokens. Solve rate moved from 82.2% to 81.1%, a difference they describe as not statistically significant. Requests above 200,000 tokens also fell from 1.9% to 0.13%.

Who it's for: coding-agent builders evaluating large tool-output histories. The source supports a completed benchmark, not a promise of the same savings on another workload. The measurements and statistical interpretation are the author's, and this entry does not independently reproduce them.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Reddit · u/MattAlreadyHere

Frequently asked questions

Did solve rate remain exactly unchanged?

No. The author reports a change from 82.2% to 81.1% and calls it not statistically significant. That is not proof of equal performance on every task.

Can the agent retrieve compressed output?

According to the author, omitted-output markers include references that a tool can resolve by line range, JSON pointer or grep. The method keeps at least one copy of each distinct line rather than relying on prose summaries alone.

More details

Remaining steps

  1. The agent could request original output through line-range, JSON-pointer or grep retrieval.
  2. The team evaluated Codex CLI on 87 Terminal-Bench 2.1 tasks and compared bills, token counts and solve rates.

About this account

Codex CLI attempted the benchmark coding tasks with compressed tool-output history. The reported integration lets an agent retrieve omitted original output through a tool instead of depending solely on a rewritten summary.

Builder's benchmark account by u/MattAlreadyHere: https://www.reddit.com/r/AI_Agents/comments/1x6wgy0/opensource_tooloutput_compressor_for_coding/. Full public RSS evidence re-read on 16 October 2026; repaired-policy body gate passed at 0.82. Author discloses Hystax employment. Measurements and significance claims are attributed, not independently reproduced. Suggested prompt by Agents In Use, not the author's original prompt. Original title-stage rejection is preserved.

Credit: u/MattAlreadyHere on Reddit, Hystax affiliation disclosed

Source published

Added to Agents In Use

Source checked

Tools and topics

Codex CLI · GPT-5.5 · Terminal-Bench 2.1 · Hystax tool-output compressor

tool output · prompt caching · cost measurement · coding benchmarks

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.