permissions hook helper
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only fire notifications for promptable tools, not read-only ones like Grep/Glob

+7 -3
+7 -3
chook.mjs
··· 453 453 } 454 454 455 455 audit(config.audit, input, "passthrough", null); 456 - // Schedule a delayed notification — PostToolUse will cancel it if tool proceeds quickly 457 - const detail = toolInput.command || toolInput.file_path || toolInput.notebook_path || toolName; 458 - scheduleNotification(input.session_id, toolName, detail); 456 + // Only notify for tools that Claude actually prompts for 457 + // Read-only tools (Grep, Glob, Read, LS) are never prompted 458 + const promptableTools = new Set(["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "Task"]); 459 + if (promptableTools.has(toolName)) { 460 + const detail = toolInput.command || toolInput.file_path || toolInput.notebook_path || toolName; 461 + scheduleNotification(input.session_id, toolName, detail); 462 + } 459 463 } catch (e) { 460 464 process.stderr.write(`chook error: ${e.message}\n`); 461 465 process.exit(1);