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
Hook fails to rewrite common command forms when piped/chained/redirected or prefixed (cat -n, grep -n, git status, ls -la, find, pnpm --filter), losing ~1.3M tokens of savings per discover scan
📁 Relevant files
src/rewrite.rs
src/discover.rs
src/hook/mod.rs
Suggested Actions
Request the raw rtk discover output/log to see exact unmatched command strings
Audit the command-matching regex/parser for pipe, &&, 2>&1, and command/backslash prefix handling
Status on v1.2.1: most forms from this report are now rewritten (cat -n, grep -n, git status, ls -la, find with an absolute path, pnpm --filter ... run build 2>&1, && chains, 2>&1 | head, (cd web && pnpm list)). Two still pass through: a backslash-escaped command (\grep foo bar) and a bare subshell ((pnpm list)). cat -n f | head stays raw on purpose. Narrowing this issue to those two forms; if your discover output shows other misses on v1.2.1, please paste the raw command strings.
Activity
rtk-wshm-sync-bot commentedon Oct 7, 2026
🔍 Automated Triage
bughighSummary
Hook fails to rewrite common command forms when piped/chained/redirected or prefixed (cat -n, grep -n, git status, ls -la, find, pnpm --filter), losing ~1.3M tokens of savings per discover scan
📁 Relevant files
src/rewrite.rssrc/discover.rssrc/hook/mod.rsSuggested Actions
rtk discoveroutput/log to see exact unmatched command stringscommand/backslash prefix handlingTriaged automatically by wshm · This is an automated analysis, not a human review.
KuSh commentedon Nov 28, 2026
Status on v1.2.1: most forms from this report are now rewritten (
cat -n,grep -n,git status,ls -la,findwith an absolute path,pnpm --filter ... run build 2>&1,&&chains,2>&1 | head,(cd web && pnpm list)). Two still pass through: a backslash-escaped command (\grep foo bar) and a bare subshell ((pnpm list)).cat -n f | headstays raw on purpose. Narrowing this issue to those two forms; if your discover output shows other misses on v1.2.1, please paste the raw command strings.