Tous les signals
Coding AgentsDeveloper ToolsTokens

RTK: Compressing What Your Coding Agent Sees

Publié le April 9, 2026
RTK intercepting shell output between a coding agent and the terminal, stripping noise before it reaches the model

I've been using RTK on my Claude Code sessions for about two weeks.

RTK is an open-source CLI proxy written in Rust. It sits between your AI coding agent and the shell. When Claude Code runs `git status` or `cargo test`, RTK intercepts the output, strips what the model doesn't need (passing tests, progress bars, boilerplate headers), and sends back a compressed version.

On my sessions, I measured 60 to 80% fewer tokens per conversation. That translated to roughly 3x more exchanges before hitting rate limits. The setup took me about a minute:

brew install rtk && rtk init -g

After that, the hook rewrites commands transparently. I didn't change anything in my workflow.

It supports Claude Code, GitHub Copilot in VSCode, Cursor, Gemini CLI, Codex, and a few others.

Nevertheless, you should be aware:

I read a case where someone was debugging a production incident with RTK active. The raw logs showed repeated timeouts across three different services. RTK compressed that into a single service timeout. The agent treated it as an isolated problem despite it wasn't. The filtered output hid the pattern that mattered.

It's a good example of the tradeoff. When you compress what an AI model sees, you're also choosing what it can reason about. Most of the time, that tradeoff is worth it. But during complex debugging, it can mislead the agent.

A few config options that I used to manage this: RTK has a "tee" mode that saves the full unfiltered output when a command fails, so you can always recover the raw data. You can exclude specific commands from filtering in ~/.config/rtk/config.toml.

And rtk discover shows which commands you ran without RTK that could have been filtered, which is useful to calibrate where the savings actually come from.

One last thing: if you install with `rtk init -g --hook-only`, it skips creating an `RTK.md` file that the agent re-reads every turn. That file adds token overhead for no real benefit since the hook already works transparently.