Hooks
Planned lifecycle automation around agent and tool events.
Hook Events#
Hooks are intended to run local validation or policy actions at defined lifecycle points such as before a tool call, after a file edit, or at session completion.
Use Cases#
- Run a formatter after supported file edits.
- Block commands that violate a project policy.
- Record a local audit event after an approved external action.
Execution Model#
Timeouts, ordering, environment inheritance, failure policy, and secret handling are not finalized. Hooks should be treated as untrusted local automation until those contracts are explicit.
Configuration#
Concept only
[[hooks.after_edit]]
command = "<project-validation-command>"
timeout_seconds = 30