[Bug] PreToolUse hook updatedInput overwritten by subsequent hooks with empty responses
Resolved 💬 3 comments Opened Jan 3, 2026 by djethino Closed Jan 4, 2026
Bug Description
Bug: PreToolUse updatedInput is overwritten when multiple hooks are registered for the same tool
When two PreToolUse hooks are registered for Edit/Write:
- Hook A returns {"permissionDecision": "allow", "updatedInput": {...}}
- Hook B returns nothing (just sys.exit(0))
The updatedInput from Hook A is lost. Hook B's empty response overwrites it.
Example:
- security-guidance (official plugin) has a PreToolUse hook for Edit/Write that returns sys.exit(0) when no security issue is found
- Any custom hook trying to use updatedInput for Edit/Write will be broken when security-guidance is also installed
Expected: updatedInput should be preserved/aggregated across hooks
Actual: Last hook's response overwrites previous hooks' updatedInput
Related: https://github.com/anthropics/claude-code/issues/15897
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 2.0.76
- Feedback ID: 06816c0e-a216-45e9-9cce-655e93c9f76e
Errors
[]
for information, I tested with and without security-guidance plugin. my plugin works well without.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗