Created
January 1, 2026 21:47
-
-
Save jtmuller5/7dfc08b42cef78dd4610268a99843810 to your computer and use it in GitHub Desktop.
Claude Code hook to delay tool calls to avoid rate limiting (designed for use with Claude Code Router)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "permissions": { | |
| "allow": ["Bash(mkdir:*)"] | |
| }, | |
| "env": { "CLAUDE_TOOL_DELAY": "2" }, | |
| "hooks": { | |
| "PreToolUse": [ | |
| { | |
| "matcher": "*", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "echo \"⏳ Delaying tool execution by ${CLAUDE_TOOL_DELAY}s...\" && sleep \"${CLAUDE_TOOL_DELAY}\"" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment