You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Guard Has No Bound on Its Own Running Time, So a Large Command Outlasts the Hook Timeout #2451
The guard's wait-loop rule has no bound on its own running time. A PreToolUse hook that runs past its timeout (60s by default in Claude Code) does not block the command, so any command large enough to make the scan exceed the timeout runs unjudged, an unbounded loop in it included.
Develop reaches this without any eval. Its cost on nested loops around many bash -c payloads grows with loops times payloads:
K nested while [ $i -lt 3 ]; do ...; done loops around P copies of bash -c 'grep -e x w w ...', followed by ; while true; do sleep 1; done.
The guard bounds its own work, for example by denying a command past a size or step limit with a message saying why, so a timeout can never be the outcome. A self-test row pins the limit.
Found while weighing timing findings on the #2080 branch, whose own slowdowns (filed beside this issue) only move the size at which this happens.
Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The hook timeout is reached only at about 330 KB of command text, which agent commands do not reach.
Activity
Read an eval's Arguments as a Wait-Loop Payload in the Guard (#2452)
Promote develop to main: Read an eval's Arguments as a Wait-Loop Payl…
ptr727 commentedon Oct 8, 2026
Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The hook timeout is reached only at about 330 KB of command text, which agent commands do not reach.