Summary
Child of #3508 (Windows process-creation tax). This issue covers one hook: block-no-verify.sh in the guardrails plugin.
Measured
|
|
| Plugin |
guardrails |
| Hook |
block-no-verify.sh |
| Event(s) |
PreToolUse:Bash + PreToolUse:PowerShell |
| Timeouts in window |
44 |
| Average duration |
76.1s |
| Worst observed |
134.1s |
| Configured timeout |
15 s |
Every recorded run exceeded the 15 s timeout, so this guard is killed before it renders a verdict. It currently costs wall-clock without providing protection on this platform.
Context from the parent
Process creation on the affected host costs 0.3-0.9 s per spawn (bash -c true = 661 ms, jq -n 1 = 908 ms, cmd.exe /c exit = 872 ms, against ~3-5 ms on a healthy host). User CPU time is ~1% of wall-clock, so the fix is reducing the number of process spawns, not optimizing script logic. See #3508 for the full measurement and environment detail.
Specific guidance
30 external call sites. Detection is a simple substring match on the command; should be achievable with bash builtins and zero subprocesses.
Acceptance criteria
Method
Counts from ~/.claude/projects/**/*.jsonl hook_cancelled attachments with timedOut: true, across 236 sessions, 2026-08-23 to 2026-08-31.
Summary
Child of #3508 (Windows process-creation tax). This issue covers one hook:
block-no-verify.shin theguardrailsplugin.Measured
guardrailsblock-no-verify.shPreToolUse:Bash + PreToolUse:PowerShellEvery recorded run exceeded the 15 s timeout, so this guard is killed before it renders a verdict. It currently costs wall-clock without providing protection on this platform.
Context from the parent
Process creation on the affected host costs 0.3-0.9 s per spawn (
bash -c true= 661 ms,jq -n 1= 908 ms,cmd.exe /c exit= 872 ms, against ~3-5 ms on a healthy host). User CPU time is ~1% of wall-clock, so the fix is reducing the number of process spawns, not optimizing script logic. See #3508 for the full measurement and environment detail.Specific guidance
30 external call sites. Detection is a simple substring match on the command; should be achievable with bash builtins and zero subprocesses.
Acceptance criteria
jq).grep/sed/cut/tr/basename/dirnameon the hot path are replaced with bash builtins.Method
Counts from
~/.claude/projects/**/*.jsonlhook_cancelledattachments withtimedOut: true, across 236 sessions, 2026-08-23 to 2026-08-31.