prefer-fast-repository-hooks
Prefer repository hooks to stay at or below the default 30-second timeout unless a slower hook is truly necessary.
Rule catalog ID: R068
Targeted pattern scopeâ
.github/hooks/**/*.json
What this rule reportsâ
- hook
timeoutSecvalues greater than the documented default 30-second timeout budget
Why this rule existsâ
Long-running hooks slow down agent workflows and increase the chance of timeouts or poor user experience. Keeping hooks within the default budget encourages lightweight, reliable automation.
â Incorrectâ
{
"version": 1,
"hooks": {
"sessionStart": [{ "type": "command", "bash": "echo ready", "timeoutSec": 120 }]
}
}
â Correctâ
{
"version": 1,
"hooks": {
"sessionStart": [{ "type": "command", "bash": "echo ready", "timeoutSec": 10 }]
}
}