PreToolUse hook: hookSpecificOutput.updatedInput silently ignored while permissionDecision is honored (2.1.220)
Version: 2.1.220 (latest on npm) · Platform: macOS (darwin 25.5.0), bash
Summary: A PreToolUse hook (matcher Bash) that returns hookSpecificOutput.updatedInput to rewrite the command, paired with permissionDecision: "allow", has its permissionDecision respected but its updatedInput silently dropped. The original command runs unchanged. The emitted JSON is a byte-for-byte match with the documented schema at code.claude.com/docs/en/hooks, so the config is correct.
Hook output (verified on stdout):
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecisionReason":"rewrite","updatedInput":{"command":"rtk git status"},"permissionDecision":"allow"}}
Expected: git status is replaced by the rewritten command before execution.
Actual: git status runs unchanged; the rewrite has no effect.
Repro:
- Add a
PreToolUsehook on matcherBashwhose script prints the JSON above. - Ask Claude to run
git status. - The plain
git statusruns; the rewritten command never executes.
Notes: permissionDecision: "allow" from the same payload is applied (no prompt shown). Output matches the documented updatedInput schema exactly. No newer build available to test against (2.1.220 is latest).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗