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
pnpm test / pnpm build are not routed, only pnpm run <script> #3675
pnpm runs a bare script name directly — pnpm test is pnpm run test — and that shorter form is
what people actually type. The rule only matched ^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script),
so pnpm test, pnpm build, pnpm lint fell through while pnpm run build was routed.
A second, smaller problem
The rule had no trailing word boundary, so pnpm installer matched on the install alternative
and was rewritten. Adding (\s|$) fixes that.
Not every script is safe to route
pnpm dev, pnpm start, pnpm serve and pnpm watch do not terminate. rtk captures child
output rather than streaming it, so routing a long-running script would leave the agent with a
blank screen until it gives up. Those are deliberately excluded.
pnpm's bare script forms (pnpm test/build/lint) aren't routed and the install alternative lacks a word boundary (falsely matches pnpm installer); fix is in src/discover/rules.rs and a PR (#3676) already addresses it.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/discover/rules.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
Still reproduces on rtk 0.48.0 (Windows 11, Claude Code hook). This goes beyond test/build: monorepos run project-specific scripts that the hook never recognises. From rtk discover over 30 days (81 sessions, 4,769 Bash commands) in one TypeScript monorepo:
Command
Count
pnpm --filter <pkg> run <script>
117
pnpm test
43
pnpm type-check
39
pnpm format:check
39
pnpm docs:check
36
rtk hook check 'pnpm type-check 2>&1' gives No rewrite for: pnpm type-check 2>&1, while pnpm lint 2>&1 is rewritten to rtk lint. Script names with - or : and the --filter <pkg> run form both fall through.
Suggestion: route any terminating script to the generic rtk err filter instead of keeping a per-name allow-list, and keep excluding the long-running ones you already listed (dev, start, serve, watch). Config-driven routing (closed #2358) would also cover this, letting a project map type-check to tsc and test to jest.
Activity
pszymkowiak commentedon Aug 23, 2026
🔍 Automated Triage
buglowSummary
pnpm's bare script forms (pnpm test/build/lint) aren't routed and the install alternative lacks a word boundary (falsely matches pnpm installer); fix is in src/discover/rules.rs and a PR (#3676) already addresses it.
📁 Relevant files
src/discover/rules.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
KennyAtCodin commentedon Sep 16, 2026
Still reproduces on rtk 0.48.0 (Windows 11, Claude Code hook). This goes beyond
test/build: monorepos run project-specific scripts that the hook never recognises. Fromrtk discoverover 30 days (81 sessions, 4,769 Bash commands) in one TypeScript monorepo:pnpm --filter <pkg> run <script>pnpm testpnpm type-checkpnpm format:checkpnpm docs:checkrtk hook check 'pnpm type-check 2>&1'givesNo rewrite for: pnpm type-check 2>&1, whilepnpm lint 2>&1is rewritten tortk lint. Script names with-or:and the--filter <pkg> runform both fall through.Suggestion: route any terminating script to the generic
rtk errfilter instead of keeping a per-name allow-list, and keep excluding the long-running ones you already listed (dev,start,serve,watch). Config-driven routing (closed #2358) would also cover this, letting a project maptype-checktotscandtesttojest.HenryQW commentedon Sep 24, 2026
if you are using pi, i wrote this as a workaround: https://www.npmjs.com/package/@henryqw/pi-rtk-test