From b7e2e1b3992063e5f6584fe4ba36c7bd8634331a Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 30 Mar 2026 09:43:01 +0900 Subject: [PATCH] docs: fix stale Future Events and wrong log example in hooks.md - Future Events: session:start/session:end are live plugin hooks, clarify they are planned for internal event stream only - Log example: session-memory listens to command:new AND command:reset, not just command:new --- docs/automation/hooks.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/automation/hooks.md b/docs/automation/hooks.md index e6874a57ad6..b247ff38b9b 100644 --- a/docs/automation/hooks.md +++ b/docs/automation/hooks.md @@ -576,10 +576,12 @@ Compaction lifecycle hooks exposed through the plugin hook runner: ### Future Events -Planned event types: +The following event types are planned for the internal hook event stream. +Note that `session_start` and `session_end` already exist as [Plugin Hook API](/plugins/architecture#provider-runtime-hooks) hooks +but are not yet available as internal hook event keys in `HOOK.md` metadata: -- **`session:start`**: When a new session begins -- **`session:end`**: When a session ends +- **`session:start`**: When a new session begins (planned for internal hook stream; available as plugin hook `session_start`) +- **`session:end`**: When a session ends (planned for internal hook stream; available as plugin hook `session_end`) - **`agent:error`**: When an agent encounters an error ## Creating Custom Hooks @@ -996,7 +998,7 @@ metadata: { "openclaw": { "events": ["command"] } } # General - more overhead The gateway logs hook loading at startup: ``` -Registered hook: session-memory -> command:new +Registered hook: session-memory -> command:new, command:reset Registered hook: bootstrap-extra-files -> agent:bootstrap Registered hook: command-logger -> command Registered hook: boot-md -> gateway:startup