Compressing shell output to save tokens in coding agents sounds like an obvious win, but rigorous benchmarking shows that it frequently backfires.
In a benchmark covering 1,740 task attempts across Claude Code and OpenCode, researchers evaluated RTK, a tool designed to strip timestamps, owners, and formatting from bash commands. While RTK slashes raw terminal characters by up to ninety percent, the actual bill did not drop accordingly.
The hidden failure mode lies in agent reasoning. When an agent loses contextual metadata like timestamps or fine-grained directory details, it often lacks the information needed to verify its actions. As a result, the model enters repetitive exploration loops, issuing extra terminal commands and burning through reasoning tokens. The savings on input tokens are completely erased by the cost of additional conversational turns.
Pruning agent context requires measuring total turn dynamics rather than single-call payload size. Stripping information that models rely on for state verification will routinely cost more than it saves.









