Lifecycle plumbing exists; the supported user setup flow does not.
Lifecycle calls proven by the client
The renderer dispatches `session_started` once per page lifecycle and sends `on_quit` best-effort during unload.
Hook record shape
Runtime-facing records include event, command, working directory, matcher, timeout, enabled state, and last-run information. Normalized timeouts are bounded to 1–300 seconds.
No public file contract
The public client does not prove `.kition/hooks.json`, merge order, PreToolUse/PostToolUse mutation, or blocking semantics. Old examples describing those behaviors have been withdrawn.
Managed runtimes need separate docs
If an organization provisions hooks privately, treat every command as local code execution and document the exact runtime/version outside the public Desktop contract.
What an Agent hook is
An Agent hook is a configured command associated with a lifecycle event. Its effect depends on the runtime event contract, execution environment, and error handling. Hook-related types alone do not establish a public setup interface or an enforceable security boundary.
Choose the appropriate automation surface
Use the visual workflow editor for supported repeatable user tasks. Treat privately provisioned runtime hooks as a separate operational interface with its own verified documentation. Do not copy configuration examples from another Agent product and assume that matching event names imply matching behavior.
| Surface | Intended use | Required evidence |
|---|---|---|
| Visual workflow | Supported trigger-and-action tasks | Configured nodes, tests, and run history |
| Runtime hook | Runtime-specific lifecycle commands | Applicable runtime contract and operator configuration |
