FabricFabric
Features

RTK Bash Token Compression

Optional integration that compresses Bash output before it reaches the model, reducing token usage on long-running development commands.

Fabric Agents can optionally route Bash output through RTK so that common development-command output (build logs, test runs, package installs, etc.) is compressed before it reaches the model. The original command is still shown in the chat transcript and goes through the same permission checks; only the captured output that the model sees is compressed.

When to enable it

Enable RTK when:

  • You frequently run verbose Bash commands (test suites, type checkers, package install logs) and want to spend fewer context tokens on their output.
  • You are working in a long session where retaining more turns of relevant context matters more than seeing every line of raw output inline for the agent.

You do not need RTK for short Bash commands, or for sessions where token usage isn't a constraint.

Setup

  1. Install rtk on your machine (version 0.23.0 or newer):

    # See https://github.com/rtk-ai/rtk for current install instructions.
  2. Open Settings → AI → Performance. The RTK panel detects whether rtk is installed and reports its version.

  3. If the installed version is missing or below 0.23.0, the panel exposes a Get RTK action that points you at the install instructions, plus a Re-check action to re-detect the binary after installing.

  4. Toggle Enable RTK Bash compression. Fabric Agents will start routing Bash through rtk immediately for new tool calls.

How it works

  • Bash tools continue to receive the original command verbatim. Permission rules, allow/deny lists, and the visible command in the chat transcript are unchanged.
  • When RTK is enabled and available, the execution path wraps the command through rtk so the captured output is compressed before being returned to the model.
  • The settings panel surfaces aggregate stats once RTK has processed commands, including saved tokens and efficiency, so you can see how much compression is actually buying you.

Disabling or troubleshooting

  • Toggle Enable RTK Bash compression off to return to uncompressed output.
  • Use Re-check if you upgraded or moved your rtk install — the binary path is cached per process and the re-check refreshes it.
  • If RTK is enabled but not installed, Bash output is returned uncompressed; the panel will show the missing-install warning until rtk is detected.

On this page