Skip to content

docs: show timeout in frontmatter-requirements.md hooks example #155

@philoserf

Description

@philoserf

Problem

The hooks example in frontmatter-requirements.md shows basic hook structure but omits the timeout option:

hooks:
  - event: "AgentStart"
    command: "./scripts/prepare-agent.sh"
    description: "Prepare the agent environment"

Users may not realize timeout is configurable and important for long-running hooks.

Solution

Expand the example to include timeout:

hooks:
  - event: "AgentStart"
    command: "./scripts/prepare-agent.sh"
    description: "Prepare the agent environment"
    timeout: 10000  # 10 seconds (default: 5000ms)

Add a note explaining timeout behavior:

**Timeout:** Hooks have a default timeout of 5 seconds. For longer operations:
- Set explicit `timeout` in milliseconds
- Consider async patterns for very long operations
- Hooks that timeout are treated as failures (may block the operation)

Files to Update

  • references/frontmatter-requirements.md

Impact

  • Priority: Low
  • Effort: Low
  • User Impact: Prevents unexpected hook failures from timeouts

Review context: commit f2fe29b (agent hooks documentation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions