PreToolUse hook: hookSpecificOutput.updatedInput silently ignored while permissionDecision is honored (2.1.220)

Status Closed — duplicate
Reported on v2.1.220
Maintainer reply None cached
Activity 2 comments · opened Jul 26, 2026 · closed Aug 15, 2026

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:

  1. Add a PreToolUse hook on matcher Bash whose script prints the JSON above.
  2. Ask Claude to run git status.
  3. The plain git status runs; 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).

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗