A command-aware filter for coding-agent output
RTK is an open-source Rust CLI proxy that wraps common developer commands and emits compact, command-aware output for coding agents, with optional hooks and raw failure tee files.
RTK is an open-source Rust command-line proxy for coding-agent workflows. It sits between an agent and common developer commands, runs the underlying command, and returns a more compact representation designed around that command's output.
The project covers Git, tests, package managers, builds, logs, JSON, filesystem inspection, containers, cloud tools, and other development surfaces. The exact behavior is command-specific. RTK is therefore better understood as a catalog of filters and runners than as one universal text compressor.
Product structure
| Surface | Role | Typical use |
|---|---|---|
| Direct CLI | Runs an RTK subcommand explicitly | Testing a filter before changing any agent configuration |
| Command wrappers | Mirrors common developer commands with compact output | Routine repository, test, build, and inspection work |
| Agent hooks | Routes supported shell commands through RTK automatically | Repeated coding-agent sessions after the filters are validated |
| Tracking and gain reports | Estimates reduced command output over time | Local observation of filter activity, not provider billing |
| Failure tee | Stores raw output under configured conditions | Recovering details hidden by a failure summary or truncated view |
Direct invocation is the smallest trust surface. Hooks create a wider boundary because they change how an agent's shell commands are executed. Test the direct commands against real project output before installing a hook.
Command-aware filtering
RTK uses knowledge of command output rather than treating every payload as generic prose. A Git status, test run, dependency list, log, and JSON response can each be transformed differently. This can remove repeated success lines, collapse large arrays, group errors, or present summary counts.
The benefit depends on the match between the filter and the decision. A summary that is ideal for a familiar successful test run may omit the one field required to debug an unfamiliar framework. Structured output can remain syntactically legible while a decisive record is outside the retained slice.
Failure recovery
RTK can write raw command output to tee files according to its configuration and execution path. Failure-mode runners can include a path to the saved raw output, allowing an agent or operator to inspect the original when the compact view is insufficient.
The tee is a recovery mechanism, not proof that every transformed result can always be reversed. Its availability depends on whether the command path uses tee handling, the configured mode, output size, exit status, retention limits, and filesystem state. For high-consequence commands, verify that the raw path is emitted under the same failure conditions the agent will encounter.
Installation and hooks
RTK is distributed as release binaries and through supported package managers. A direct binary can be evaluated without changing a shell profile or coding-agent configuration. Optional initialization and hook commands can automate routing for supported clients.
That separation is useful. A safe rollout can begin with explicit rtk commands in a disposable or low-risk repository, compare compact output against raw output, then install a hook only for command families whose retained evidence has been reviewed.
Local state and telemetry
RTK runs commands locally and maintains local state for tracking, audit, configuration, and tee output. The official project describes telemetry as disabled by default and consent-based. Teams should still direct state into approved paths, review retention, and keep sensitive raw tee files out of shared or indexed locations.
RTK's reported token savings are estimates derived from command-output size, not measurements of a complete model request, cache behavior, or provider invoice. Treat gain reports as a local optimization signal rather than a billing ledger.
Best fit
RTK is a strong fit for:
- coding agents that run many predictable shell commands;
- teams willing to validate output one command family at a time;
- environments that prefer a small native binary over a Python context stack;
- workflows where repeated success noise dominates the raw output;
- operators who can retain and protect raw failure evidence.
Less natural fit
It is a weaker default for:
- arbitrary prose or application-level message arrays;
- unfamiliar output where the decisive fact has not been defined;
- nested structured data whose most important record may appear late;
- teams expecting every direct filter to be reversible;
- workflows that need one compression layer across several model APIs and MCP tools.
RTK is most effective when the command grammar is known and the compact view has been tested against the actual decisions an agent makes. The right question is not how much output disappeared, but whether the remaining output is sufficient to act—or points clearly to the raw evidence when it is not.

