RTK: Cut AI Coding Agent Token Usage by 60–90% RTK, a single Rust binary launched November 6, sits between the shell and AI coding tools to compress CLI command output before it reaches the LLM context window, cutting 60–90% of tokens on verbose commands, according to the tool's published savings data across 2,900+ real commands. RTK reports `cargo test` output drops 91.8%, `git status` 80.8% and `grep` 49.5%, while a community benchmark on a 64-module, roughly 17K-line Rust project found an average 65.7% reduction across 14 commands; measured against total Claude Code session spend, RTK saves closer to 3.7% because most tokens come from code context and file reads. The binary installs a PreToolUse hook via `rtk init -g`, adds under 10ms of overhead per command, supports 100+ development commands and 18 AI coding tools including Claude Code, GitHub Copilot, Cursor and OpenAI Codex. Every AI coding session burns tokens on CLI output your agent barely reads. A cargo test run dumps hundreds of lines of compiler warnings and test results — the model processes a fraction of them before moving on. RTK , a single Rust binary that launched November 6, sits between your shell and your AI coding tool. It intercepts command output before it reaches the LLM context window and compresses it. On verbose commands, it removes 60–90% of the tokens. On typical developer workflows, real-world savings are more modest — but it takes ten minutes to install and nothing to maintain. What RTK Does, and Why Token Costs Make It Worth Trying AI coding agent costs in 2026 have moved from “nice to know” to “budget line item.” Claude API at full-day agent usage runs roughly 63/month per developer https://www.morphllm.com/ai-coding-costs . Uber reportedly burned through its full-year AI budget by April after widespread Claude Code and Cursor adoption. Microsoft’s Experiences + Devices division banned Claude Code for its engineers over token bills reportedly hitting ,000 per engineer monthly. The costs are real and they scale fast. Most of that spend comes from code context and file reads — things RTK doesn’t touch. But a meaningful slice comes from CLI command output: build logs, test results, git diffs, grep matches. That’s RTK’s lane. It doesn’t claim to solve everything, just to handle one layer efficiently. How RTK Works RTK is a CLI proxy. When you run rtk init -g , it installs a PreToolUse hook directly into Claude Code and equivalents for other tools . After that, when your agent calls git status , the hook transparently rewrites it to rtk git status . RTK executes the original command, applies compression — stripping ANSI escape codes, deduplicating repeated lines, collapsing similar consecutive output, truncating beyond what an agent needs — then returns the clean result. The agent receives compressed output without you changing a single prompt. The binary is written in Rust, ships as a single file with zero runtime dependencies, and adds less than 10ms of overhead per command. It supports 100+ common development commands across files, Git, GitHub CLI, test runners, linters, builds, package managers, containers, and cloud tools. Install brew install rtk macOS/Linux winget install rtk-ai.rtk Windows Hook into Claude Code adds PreToolUse hook automatically rtk init -g Check cumulative savings after a few sessions rtk gain Find commands where you are missing compression rtk discover The Numbers — What RTK Actually Saves RTK publishes measured savings data https://www.rtk-ai.app/savings/ across 2,900+ real commands. On CLI output specifically: cargo test drops 91.8%, git status drops 80.8%, grep drops 49.5%. A community benchmark on a real Rust project https://github.com/rtk-ai/rtk/discussions/2371 64 modules, ~17K lines found an average 65.7% reduction across 14 commands, with high-output commands hitting 80–99% and low-output commands occasionally adding small overhead. Here is the honest version of the headline numbers: when measured against total Claude Code session spend — not just CLI output — RTK saves closer to 3.7%. The gap exists because most session tokens come from code context, file reads, and planning rounds, not from shell commands. If your agent spends most of its time reading files and writing code, RTK will make less of a dent. If your workflow involves heavy build/test cycles, long cargo or npm outputs, and frequent git operations, it hits closer to the advertised range. It Works With Every Major AI Coding Tool RTK officially supports 18 AI coding tools: Claude Code, GitHub Copilot VS Code and CLI , Cursor, Gemini CLI, OpenAI Codex, Windsurf, Cline, Roo Code, OpenCode, Kilo Code, Google Antigravity, and Kimi AI, among others. The GitHub repo https://github.com/rtk-ai/rtk includes tool-specific setup instructions and rules files that guide each agent to prefer rtk -prefixed commands. If your team runs a mix of tools, RTK covers the stack. Token Compression Is Becoming Infrastructure RTK isn’t a one-off hack — it’s part of an emerging category. Five open-source tools now target token waste at different layers of the pipeline: RTK handles CLI output; Headroom compresses at the API proxy level JSON data, RAG blocks, tool output ; Caveman targets model output verbosity and log compression; Ponytail reduces the volume of generated code; pxpipe trims what gets sent to context in the first place. They’re designed to work together, not compete. Managing what your agent sees — and how much of it — is becoming its own engineering discipline. RTK handles the CLI slice. For teams already paying significant monthly token bills, that’s a reasonable place to start: free, low-risk, and reversible. Install it, run rtk gain after a week of normal sessions, and decide whether the savings justify keeping it. On verbose workflows, they usually do.