Skip to content

docs(hooks): document plugin hook names and clarify naming#12819

Closed
JBrady wants to merge 1 commit intoopenclaw:mainfrom
JBrady:docs/12436-document-hooks
Closed

docs(hooks): document plugin hook names and clarify naming#12819
JBrady wants to merge 1 commit intoopenclaw:mainfrom
JBrady:docs/12436-document-hooks

Conversation

@JBrady
Copy link
Copy Markdown

@JBrady JBrady commented Feb 9, 2026

Summary

Documents currently implemented plugin hook names and clarifies internal-hook vs plugin-hook naming to prevent confusion.

What changed

  • Updated docs/tools/plugin.md (Plugin hooks section):

    • Added the currently available plugin hook names:
      • before_agent_start, agent_end
      • message_received, message_sending, message_sent
      • before_tool_call, after_tool_call
      • session_start, session_end
    • Added a naming note to use underscore hook names exactly (for example message_received, not message:received).
  • Updated docs/automation/hooks.md:

    • Renamed Future Events to Future Events (internal hooks)
    • Clarified that the listed type:action names belong to internal hooks
    • Added a note pointing readers to plugin hook names under /tools/plugin#plugin-hooks

Why

Issue #12436 reports confusion where plugin hooks appeared undocumented and message:received looked like a future-only event. The actual confusion is between two hook systems with different naming conventions (internal type:action vs plugin underscore names). This PR documents the available plugin hooks and disambiguates naming.

Closes #12436

Contributing checklist

  • AI-assisted: yes (prepared with OpenClaw assistant, model: openai-codex/gpt-5.3-codex)
  • Testing level: lightly tested (docs-only change; link/build/test not run for this docs PR)
  • Confirmed understanding of change and impact

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 9, 2026

Greptile encountered an error while reviewing this PR. Please reach out to [email protected] for assistance.

@openclaw-barnacle openclaw-barnacle bot added the docs Improvements or additions to documentation label Feb 9, 2026
@JBrady
Copy link
Copy Markdown
Author

JBrady commented Feb 9, 2026

Thanks for the review.

It looks like this PR is currently blocked by an unrelated Windows test failure in CI, not by the docs changes in this branch.

Failing job: checks-windows (node, test, pnpm canvas:a2ui:bundle && pnpm test)
https://github.com/openclaw/openclaw/actions/runs/21839508563/job/63021145424

The failures in that job are in src/plugins/source-display.test.ts with path separator assertions (\ vs /).

I’m happy to re-run checks and keep this updated, and I can also rebase once the Windows test issue is resolved upstream.

@JBrady JBrady force-pushed the docs/12436-document-hooks branch from a05ff9d to 658ec07 Compare February 9, 2026 21:23
@JBrady
Copy link
Copy Markdown
Author

JBrady commented Feb 9, 2026

Quick follow-up: I refreshed this branch onto the latest main and reapplied only the docs commit to keep the PR history clean.

Current run is now on the docs-only path (docs-scope passes, heavy jobs including checks-windows are skipped), and checks are green for this PR flow.

@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels Feb 21, 2026
@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Mar 9, 2026
@openclaw-barnacle
Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Document undocumented hooks (before_agent_start, message_received, etc.)

1 participant