Repository navigation
RTK Troubleshooting
There are two unrelated CLI tools both named rtk:
| Binary | What it is | What you want |
|---|---|---|
rtk-ai/rtk |
Rust Token Killer — the proxy this wiki documents | ✅ Yes |
reachingforthejack/rtk |
Rust Type Kit — unrelated codegen tool | ❌ No |
which rtk # confirm the path
rtk --version # both will print something; not conclusive
rtk gain # ← THIS is the tell-
rtk-ai/rtk→ prints token-savings analytics. -
reachingforthejack/rtk→ prints "unknown subcommand" or a Type Kit help screen.
If you have the wrong one, remove it:
# If installed via cargo
cargo uninstall rtk
# If installed via brew under a different formula name
brew list | grep rtk
brew uninstall <wrong-formula>
# Then install the correct one
brew install rtk
# or:
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | shVerify again with rtk gain — that command must work for the right binary.
Failure usually means:
-
~/.claude/settings.jsonis malformed (RTK refuses to overwrite invalid JSON). - The path doesn't exist yet because Claude Code has never run on this machine.
Fix:
# Make sure the dir + file exist
mkdir -p ~/.claude
[ -f ~/.claude/settings.json ] || echo '{}' > ~/.claude/settings.json
# Re-run
rtk init -gIf it still fails, capture the exact stderr and open an issue at rtk-ai/rtk.
Symptoms: rtk gain --history is empty even though you've run several Bash commands in Claude Code.
Check in order:
-
Restart required. Did you restart Claude Code after
rtk init -g? The hook is read at start-up. -
Hook actually registered?
This is the authoritative answer. If it says "not active", run
rtk init --show
rtk init -g(or/rtk-activatein UFIL) and restart. - Wrong binary on PATH? See the name-collision section above.
-
Claude Code config overridden by project settings. If your project's
.claude/settings.jsonredefines thePreToolUsehooks without the RTK entry, you'll bypass the global hook. Merge RTK's hook into the project config or remove the override.
UFIL's sentinel ${XDG_CACHE_HOME:-$HOME/.cache}/ufil/rtk-initialized answers "has UFIL already run rtk init -g?" — it is not the source of truth for whether RTK is active.
If /rtk-status reports drift:
- Sentinel present, hook inactive → user (or another tool) uninstalled the hook outside UFIL. Run
/rtk-activate. - Sentinel missing, hook active → cache was cleared; harmless. Run
/rtk-activateto recreate the sentinel, or ignore.
Manual reset:
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/ufil/rtk-initialized"
# next Claude Code session will re-run `rtk init -g`RTK is conservative by default but it does drop content (that's the whole point). If a command's output looks truncated or misleading inside Claude:
- Reproduce the raw output:
rtk proxy <command>— this is what Claude actually saw. - Compare against the un-proxied:
<command>directly. - If RTK's filter is too aggressive for your case, report it upstream with the diff.
Short-term workaround: disable the hook for that session via /rtk-deactivate, run the command, then re-activate.
RTK bugs (filter behaviour, init failures, binary crashes) → rtk-ai/rtk issues. Include:
rtk --version- OS + shell
-
rtk init --showoutput - Minimal reproduction (
rtk proxy <command>plus the raw command output)
Bugs specific to UFIL's auto-installer (sentinel logic, install-rtk.sh) → gm-claude-plugins issues.
coming soon
coming soon