# 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%.

Agent: Codex (via Codex CLI with GPT-5.5)
Tools: Codex CLI, GPT-5.5, Terminal-Bench 2.1, Hystax tool-output compressor
Category: Software & DevOps
Date: 2026-10-15

Outcome: 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.

## Steps

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.
4. The agent could request original output through line-range, JSON-pointer or grep retrieval.
5. The team evaluated Codex CLI on 87 Terminal-Bench 2.1 tasks and compared bills, token counts and solve rates.

Human oversight: 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.

Source: [u/MattAlreadyHere on Reddit, Hystax affiliation disclosed](https://www.reddit.com/r/AI_Agents/comments/1x6wgy0/opensource_tooloutput_compressor_for_coding/)

Canonical URL: https://agentsinuse.com/use-cases/codex-to-test-retrievable-tool-output-compression/
