You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
warn: detect and report RTK_DISABLED=1 overuse in sessions #508
Claude Code (and other AI agents) may learn to use RTK_DISABLED=1 as a workaround after encountering a single filtering issue, then over-generalize it to all commands — silently killing token savings.
Real example: in a session with 801 Bash commands, 243 (30%) used RTK_DISABLED=1 unnecessarily. This dropped the average savings from ~65-70% to 48.5%. Commands like gh pr list, gh pr view, cargo test, git log, and curl were all bypassed even though RTK handles them correctly.
Root cause
A past bug (#196) where gh --json output was corrupted led to a RTK_DISABLED=1 workaround. The bug was fixed in the rewrite logic (skip --json/--jq/--template), but the workaround persisted in agent memory and spread to unrelated commands.
Proposed solution
rtk gain warning: detect RTK_DISABLED=1 usage in tracking DB and warn when >10% of commands bypass RTK
rtk discover detection: flag sessions with high RTK_DISABLED=1 usage as "missed savings"
Docs: add a note in CLAUDE.md that RTK_DISABLED=1 should almost never be needed (the rewrite hook already skips --json/--jq/--template and unknown commands)
Impact
Could recover 15-20% savings for affected users with zero code change on their side.
Activity
fix: warn when no hook installed + rtk gain hook status + PR #499 fixes
fix: detect and warn RTK_DISABLED=1 overuse (#508)
chore: merge develop into master (rtk-ai#499)
Merge pull request #528 from ousamabenyounes/fix/rtk-disabled-warning
warn: emit stderr warning when RTK_DISABLED=1 is detected
fix: warn when no hook installed + rtk gain hook status + PR rtk-ai#499…
fix: detect and warn RTK_DISABLED=1 overuse (rtk-ai#508)
chore: merge develop into master (rtk-ai#499)
warn: emit stderr warning when RTK_DISABLED=1 is detected
Merge pull request rtk-ai#528 from ousamabenyounes/fix/rtk-disabled-w…
warn: emit stderr warning when RTK_DISABLED=1 is detected
Merge pull request rtk-ai#528 from ousamabenyounes/fix/rtk-disabled-w…