DistilCodeAll techniques

Technique 05 / 14 · Noise reduction

Bash output trimmer

Stop installs, builds and container pulls from flooding the context with lines nobody reads.

Interactive model

See the change.

Compare a verbose cargo build log with a concise summary of the result and warnings.

Trimmed output3 summary lines

cargo build

✓ build finished in 32.4s
· 214 crates compiled
· 2 warnings: filter.rs:214, tree.rs:87

Conceptual demonstration. Counts illustrate the flow, not measured production savings.

How it works

Less context. Same thread of work.

A successful command can print thousands of lines that are irrelevant to the next decision. DistilCode routes common dev commands through Token Killer (rtk), which filters their output: grouping, deduplication, failures-only test summaries. Errors, warnings and the closing summary survive; download progress and repeated lines collapse.

If a command has no filtered equivalent, it runs untouched and the output ceiling is the backstop: oversized output becomes a bounded preview, and the complete result is saved so the agent can Grep or read a range of it instead of ingesting it all.

In practice

The operating loop

  1. 01

    Rewrite the command

    Known commands run through rtk, which prints a filtered version of the same output.

  2. 02

    Keep what matters

    Errors, warnings and summary lines stay; progress bars and repeats collapse.

  3. 03

    Bound the rest

    Anything still oversized is capped by lines and bytes, with the full output saved for targeted reads.