Config key to auto-allow specific ask-level commands ([hooks] allow_ask_commands)
#1344 opened on Apr 16, 2026
Description
Summary
Some registry entries (e.g. jest, vitest) return exit code 3 from rtk rewrite, surfacing a permission prompt on every invocation. Users in long agentic sessions (Claude Code, Cursor) get prompted repeatedly for commands they have already decided to trust. The ask/auto-allow decision is currently hardcoded in src/discover/rules.rs — there is no config escape hatch.
The existing [hooks] exclude_commands does the opposite (skip rewrite entirely). Missing: an allowlist for ask-level rules.
Proposed shape
[hooks]
allow_ask_commands = ["jest", "vitest"]
When the rewrite lookup lands on an ask-level rule, check if the command name is in this list and emit permissionDecision: "allow" if so.
Why config vs. per-command PR
Trust levels vary. Putting ask → auto-allow in user config lets individuals opt in without forking or pushing per-command changes upstream. Also scales to future additions without repo churn.
Environment
- rtk v0.36.0 (Homebrew, macOS)
- Consumer: Claude Code PreToolUse(Bash) hook installed via
rtk init -g