ARCANADA
All Posts
Blog May 22, 2026

Coworker v0.3.0 — RTK Plugin: 60–90% Prompt-Token Savings on Shell Output

Coworker v0.3.0 — RTK Plugin: 60–90% Prompt-Token Savings on Shell Output

We shipped coworker v0.3.0 — an optional Rust Token Killer (RTK) plugin for Claude Code.

Four new subcommands: coworker rtk install, enable, disable, status. No breaking changes — ask, write, stats, debug work as before. The plugin is off by default.

Why this matters

Two independent sources of token cost:

  1. Coworker delegates file reading to a cheap LLM. You don't pay Opus for reading 600-line files. Savings: an order of magnitude.
  2. RTK filters stdout from git, pytest, find, docker logs on the local machine, compressing noise by 60–90% before it reaches the LLM context.

Together they cover both cost sources. One tool handles I/O. The other handles shell noise.

What's new

CommandWhat it does
coworker rtk installPrints RTK install instructions for your OS (macOS / Linux / Windows).
coworker rtk enableAppends a marker-tagged hook block to ~/.claude/settings.json.
coworker rtk disableRemoves only the marker-tagged block; other hooks untouched.
coworker rtk statusReports RTK binary path, version, and hook state.

The plugin never installs the binary itself. You install RTK manually — brew install rtk, cargo install, or the curl script. The plugin only manages the hook.

Hook idempotence

enable appends a block carrying the marker _managed_by: "coworker-rtk". Repeated calls do not duplicate — the block lands exactly once. disable searches by the marker alone.

{
  "matcher": "Bash",
  "hooks": [
    {
      "type": "command",
      "command": "rtk hook claude",
      "_managed_by": "coworker-rtk",
      "_version": 1
    }
  ]
}

The write is atomic — tempfile + os.replace. If an editor's autosave races with the write, a repeated enable restores integrity.

If your settings.json already carries coworker-hook-guard, the RTK block is added alongside it, never overwritten. Guard and RTK fire in sequence: guard checks, RTK compresses output.

Benchmark numbers

The benchmark is hybrid: a synthetic corpus of typical command stdout, plus live API calls to Moonshot and DeepSeek. Median over N=5 repeats for reproducibility within ±5 p.p. Real numbers from a live two-provider run:

CommandTokens beforeTokens afterDelta
pytest (30 passed) — Moonshot64950−92.3%
git log --stat (5 commits) — Moonshot47891−81.0%
ruff check (90 errors) — Moonshot1958813−58.5%
find (50 files) — Moonshot593358−39.6%
docker logs (with trace) — Moonshot104910490.0%
pytest — DeepSeek64954−91.7%
ruff check — DeepSeek2076859−58.6%

Two runs with the same corpus produced identical delta_% across all rows (0.0 p.p. drift) — well inside the ±5 p.p. success criterion. docker logs at 0% is an edge case: RTK has no specialized filter for arbitrary application logging, so it passes the input through. This is the honest reading — for noisy pytest / git / ruff output the savings are 60–97%; for non-standard output they may be zero. The benchmark is a diagnostic, not a marketing pitch.

Reproduce on your own keys:

RUN_LIVE_TESTS=1 MOONSHOT_API_KEY=... DEEPSEEK_API_KEY=... \
  python3 scripts/bench_rtk.py --output ./bench.md

Quick start

macOS:

brew install rtk
coworker rtk enable
coworker rtk status

Linux:

curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh
coworker rtk enable
coworker rtk status

Windows: download rtk-x86_64-pc-windows-msvc.zip from releases, extract to a directory on PATH, then run coworker rtk enable and coworker rtk status.

After enable, restart Claude Code so the hook is loaded.

Compatibility

v0.3.0 is an additive minor release. No breaking behaviour. If you already use coworker ask / write / stats / debug, just upgrade:

pipx upgrade coworker
# or:
pip install --upgrade git+https://github.com/Arcanada-one/coworker

The RTK plugin is default-off. If you don't touch the rtk subcommand, nothing changes for you.

Links

One human life matters.