RTK
CLI proxy that compresses shell command output to cut LLM coding-agent token usage.
Used to cut input tokens in coding agents like Claude Code by compressing command output123, with the biggest gains on CLIs such as gh and docker.4 The most common complaint is that the savings are small or unnoticeable567, and some found agents ran longer or did worse with it enabled.89
Why people recommend it
Fewer input tokens · 3
Compresses command output via hooks to reduce input tokens sent to the model.
“It uses hooks to replace certain commands with optimized ones and helps reduce the number of input tokens.”
“Works fine, yeah it only compresses command output so only input tokens are affected”
Show 1 more
“RTK has save me a lot of usage there”
Agent integration · 3
Commenters found it useful alongside agents like Claude Code and Pi.
“for agentic coding e.g. Claude Code I found this useful”
Show 1 more
“It uses hooks to replace certain commands with optimized ones and helps reduce the number of input tokens.”
Bypass option · 1
Compression can be disabled with RTK_DISABLE=1 to restore full output.
“Works fine, yeah it only compresses command output so only input tokens are affected”
Narrow focus · 1
Described as focused purely on output compression, unlike broader tools.
“RTK on the otherhand is focused purely on the compression.”
Caveats and dissent
Small savings · 3
Several users saw little or no noticeable token reduction in practice.
“After I used it in one session of 300k tokens, I had maybe 3k tokens saved.”
“I have tried both of these and I have to say, I didn't notice any difference.”
Show 1 more
Worse agent results · 2
Some found agents took longer or scored better with it turned off.
“Empirically, I found RTK makes my agents run longer to complete similar tasks.”
“I got clearly better results with both off”
Task dependent · 2
Helps with some CLIs but not grep, git, or file reads.
“RTK has save me a lot of usage there”
“I have tried both of these and I have to say, I didn't notice any difference.”
Skepticism · 2
Some call token-saving hacks like it snake oil or expect many caveats.
“All of these "hacks" are snakeoil”
“which decreases the amount of token used by tool calls and, although it seems an interesting idea, I am pretty sure there are many caveats”
Alternatives preferred · 1
One commenter preferred Headroom for its accuracy benchmarks and transparency.
“I liked their approach a lot better than RTK”
Often compared with
From the makers not counted in the ranking
“So I built RTK. It wraps commands and strips the junk before it reaches your context”
Threads where it came up
- RTK reports token savings, but our cost benchmarks disagree 3 mentions
- The Token Compression Illusion: Why I'm Skeptical of RTK 3 mentions
- Why does Opus 5 feel worse to work with? 1 mention
- Ask HN: Will we start seeing tools for LLM use? 1 mention
- Don't trust large context windows 1 mention
- Ask HN: What works for cutting AI token costs? 1 mention
Also written as rtk. Data: rtk.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.
All comments 14
“RTK has save me a lot of usage there”
“Empirically, I found RTK makes my agents run longer to complete similar tasks.”
“All of these "hacks" are snakeoil”
“Has it helped? Somewhat.”
“RTK on the otherhand is focused purely on the compression.”
“After I used it in one session of 300k tokens, I had maybe 3k tokens saved.”
“I liked their approach a lot better than RTK”
“Works fine, yeah it only compresses command output so only input tokens are affected”
“which decreases the amount of token used by tool calls and, although it seems an interesting idea, I am pretty sure there are many caveats”
“for agentic coding e.g. Claude Code I found this useful”
“I got clearly better results with both off”
“(3) using rtk”
“I have tried both of these and I have to say, I didn't notice any difference.”
“It uses hooks to replace certain commands with optimized ones and helps reduce the number of input tokens.”