AI Slop bug report:
Version
rtk 0.39.0
Reproduction Steps
- Install the RTK hook in a project-level
.claude/settings.json (not the global ~/.claude/settings.json):
{
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "rtk hook claude" }]
}]
}
}
- Do NOT add the hook to
~/.claude/settings.json.
- Run any command that RTK intercepts (e.g.,
git show --stat HEAD).
Expected Behavior
No warning. The hook is installed and working — RTK is intercepting and rewriting Bash commands. Token savings are being recorded correctly (rtk gain shows saved tokens).
Actual Behavior
Every intercepted command emits this warning in its output:
[rtk] /!\ No hook installed — run `rtk init -g` for automatic token savings
Root Cause
RTK's "no hook installed" check only looks for a global hook registration. It does not check whether rtk hook claude is already running (which it demonstrably is, since the hook process itself is what emits the warning). Project-level Claude Code hooks are a valid and intentional installation path — teams version their .claude/settings.json alongside the codebase so all contributors get the hook automatically.
Impact
- False warning pollutes every intercepted command's output.
- Warning appears inside token-filtered output returned to the LLM, consuming the tokens RTK is trying to save.
- No way to suppress it —
rtk config exposes no option to disable this warning.
Suggested Fix
Before emitting the warning, check whether rtk hook claude is actually running (e.g., inspect RTK_HOOK_ACTIVE env var, or detect that stdin contains a hook payload). If the hook is active, suppress the warning regardless of global registration state. Alternatively, expose a [display] show_hook_warning = false config option.
AI Slop bug report:
Version
rtk 0.39.0
Reproduction Steps
.claude/settings.json(not the global~/.claude/settings.json):{ "hooks": { "PreToolUse": [{ "matcher": "Bash", "hooks": [{ "type": "command", "command": "rtk hook claude" }] }] } }~/.claude/settings.json.git show --stat HEAD).Expected Behavior
No warning. The hook is installed and working — RTK is intercepting and rewriting Bash commands. Token savings are being recorded correctly (
rtk gainshows saved tokens).Actual Behavior
Every intercepted command emits this warning in its output:
Root Cause
RTK's "no hook installed" check only looks for a global hook registration. It does not check whether
rtk hook claudeis already running (which it demonstrably is, since the hook process itself is what emits the warning). Project-level Claude Code hooks are a valid and intentional installation path — teams version their.claude/settings.jsonalongside the codebase so all contributors get the hook automatically.Impact
rtk configexposes no option to disable this warning.Suggested Fix
Before emitting the warning, check whether
rtk hook claudeis actually running (e.g., inspectRTK_HOOK_ACTIVEenv var, or detect that stdin contains a hook payload). If the hook is active, suppress the warning regardless of global registration state. Alternatively, expose a[display] show_hook_warning = falseconfig option.