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
SSH filter passes verify (3/3) but rtk rewrite returns exit 1 — 539 ssh commands unintercepted in 30 days on Claude Code hook path #1653
The built-in ssh filter is registered (passes rtk verify --filter ssh)
but rtk rewrite never matches any ssh ... command shape, so the Claude
Code Bash hook path leaves all ssh invocations uncompressed. Other built-in
filters (ps, grep, ls) on the same machine continue to match correctly.
rtk discover from this machine lists ssh as the #1 unhandled command,
with 539 invocations in 30 days vs 53 for sqlite3 and 26 for scp.
Estimated savings missed at 95% compression: ~50K-100K tokens/month for
this single user (infra ops with heavy ssh use).
Earlier in-the-wild evidence
rtk gain --history from a prior session captured 10 rtk:toml ssh ...
intercepts during a ~5-min window (86.5% savings) and zero intercepts since,
across multiple Claude Code session restarts. The current 30-day history
shows rtk:toml ps -ef and rtk:toml ansible-playbook firing normally —
ssh is the only built-in filter that has gone dark.
Expected vs actual
Expected:rtk rewrite "ssh root@host uptime" returns exit 0/3 with
the rewritten rtk ssh ... command, mirroring ps -ef behavior, so the
Claude Code hook can route ssh through compression.
Actual:rtk rewrite returns exit 1 (passthrough) for every ssh form
tested, despite rtk verify --filter ssh reporting 3/3 tests passing.
Hypothesis
The verify and rewrite code paths appear to consult the SSH filter
differently — verify exercises the filter directly while rewrite may
have an exclusion or path bug that skips ssh. Possibly related to the
v0.35.0 security change (#886) that altered registry default behavior, but
that should produce exit 3, not exit 1.
Ask
Could you confirm whether rtk rewrite is intentionally excluding ssh
in current builds, and if not, what diagnostic output would help track this
down? Happy to bisect across versions if useful.
The ssh built-in filter passes rtk verify but rtk rewrite never matches ssh commands (exit 1), leaving all ssh invocations uncompressed; likely a discrepancy between the verify and rewrite code paths, possibly introduced by the v0.35.0 registry change.
Triaged automatically by wshm · This is an automated analysis, not a human review.
Withdrawing this issue — original report had unsanitized output that I'd rather not leave in revision history. Refiling a cleaner version separately. Sorry for the noise.
Activity
pszymkowiak commentedon Apr 30, 2026
🔍 Automated Triage
bughighSummary
The ssh built-in filter passes
rtk verifybutrtk rewritenever matches ssh commands (exit 1), leaving all ssh invocations uncompressed; likely a discrepancy between the verify and rewrite code paths, possibly introduced by the v0.35.0 registry change.Triaged automatically by wshm · This is an automated analysis, not a human review.
pitimon commentedon Apr 30, 2026
Withdrawing this issue — original report had unsanitized output that I'd rather not leave in revision history. Refiling a cleaner version separately. Sorry for the noise.