Hook Execution Failure When Multiple Hook Types Combined
Resolved 💬 3 comments Opened Jul 22, 2025 by tbnge Closed Jan 4, 2026
Bug Description
Summary of Findings:
The issue occurs when multiple hook
types are combined, not with
individual hooks:
- ✅ PreToolUse hooks alone: ESC works
- ✅ PostToolUse hooks alone: ESC
works
- ✅ Notification hooks alone: ESC
works
- ❌ All hooks combined: ESC fails
with "PostToolUse:Read hook execution
cancelled"
The bug is in Claude Code's hook
handling when a command is cancelled -
it tries to process PostToolUse hooks
for a cancelled operation but the
expected data structure is missing.
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.56
- Feedback ID: 9a3f816a-a063-458b-adea-458dc4336b27
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at checkExecSyncError (node:child_process:890:11)\n at execSync (node:child_process:962:15)\n at A7 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:797:5848)\n at file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:48013\n at Q (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at fY (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:45724)\n at QK (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:44590)\n at SB (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:50639)\n at Gn0 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:50797)","timestamp":"2025-07-22T00:27:58.056Z"},{"error":"Error: ENOENT: no such file or directory, open '/proc/version'\n at Object.openSync (node:fs:596:3)\n at Module.readFileSync (node:fs:464:35)\n at Object.readFileSync (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:615:7077)\n at file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:615:8638\n at Q (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at kT4 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:62815)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-22T00:27:58.882Z"},{"error":"Error: 1: ENOENT \n at yC6 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1277:4679)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async jC6 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1277:2036)","timestamp":"2025-07-22T00:27:58.939Z"},{"error":"Error: Failed to check bun permissions\n at ql6 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1795:722)\n at async uJA (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1795:840)\n at async m61 (file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1805:43)\n at async file:///Users/bob/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:2700:10621","timestamp":"2025-07-22T00:27:59.481Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗