require-valid-agent-hook-timeouts
Require Copilot custom-agent hook timeout values to be numeric seconds when present.
Rule catalog ID: R016
Targeted pattern scopeâ
.github/agents/**/*.agent.md
What this rule reportsâ
- agent-scoped hook entries whose
timeoutvalue is present but not numeric
Why this rule existsâ
VS Code hook documentation defines timeout as a numeric value in seconds. Keeping hook timeout metadata numeric avoids ambiguous strings and keeps custom-agent hook frontmatter aligned with the documented hook command format.
â Incorrectâ
---
description: Format files after editing
hooks:
PostToolUse:
- type: command
command: ./scripts/format.sh
timeout: soon
---
Format edited files after tool usage.
â Correctâ
---
description: Format files after editing
hooks:
PostToolUse:
- type: command
command: ./scripts/format.sh
timeout: 15
---
Format edited files after tool usage.