Skip to content

Commit d3d9b57

Browse files
committed
docs: clarify live plugin runtime reloads
1 parent 5ca6b35 commit d3d9b57

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

‎docs/cli/plugins.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,23 @@ table view to per-plugin detail lines with source/origin/version/activation
200200
metadata. Use `--json` for machine-readable inventory plus registry
201201
diagnostics.
202202

203+
`plugins list` runs discovery from the current CLI environment and config. It is
204+
useful for checking whether a plugin is enabled/loadable, but it is not a live
205+
runtime probe of an already-running Gateway process. After changing plugin code,
206+
enablement, hook policy, or `plugins.load.paths`, restart the Gateway that
207+
serves the channel before expecting new `register(api)` code or hooks to run.
208+
For remote/container deployments, verify you are restarting the actual
209+
`openclaw gateway run` child, not only a wrapper process.
210+
211+
For runtime hook debugging:
212+
213+
- `openclaw plugins inspect <id> --json` shows registered hooks and diagnostics
214+
from a module-loaded inspection pass.
215+
- `openclaw gateway status --deep --require-rpc` confirms the reachable Gateway,
216+
service/process hints, config path, and RPC health.
217+
- Non-bundled conversation hooks (`llm_input`, `llm_output`, `agent_end`) require
218+
`plugins.entries.<id>.hooks.allowConversationAccess=true`.
219+
203220
Use `--link` to avoid copying a local directory (adds to `plugins.load.paths`):
204221

205222
```bash

‎docs/tools/plugin.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ Looking for third-party plugins? See [Community Plugins](/plugins/community).
151151
Config changes **require a gateway restart**. If the Gateway is running with config
152152
watch + in-process restart enabled (the default `openclaw gateway` path), that
153153
restart is usually performed automatically a moment after the config write lands.
154+
There is no supported hot-reload path for native plugin runtime code or lifecycle
155+
hooks; restart the Gateway process that is serving the live channel before
156+
expecting updated `register(api)` code, `api.on(...)` hooks, tools, services, or
157+
provider/runtime hooks to run.
158+
159+
`openclaw plugins list` is a local CLI/config snapshot. A `loaded` plugin there
160+
means the plugin is discoverable and loadable from the config/files seen by that
161+
CLI invocation. It does not prove that an already-running remote Gateway child
162+
has restarted into the same plugin code. On VPS/container setups with wrapper
163+
processes, send restarts to the actual `openclaw gateway run` process, or use
164+
`openclaw gateway restart` against the running Gateway.
154165

155166
<Accordion title="Plugin states: disabled vs missing vs invalid">
156167
- **Disabled**: plugin exists but enablement rules turned it off. Config is preserved.
@@ -197,6 +208,27 @@ OpenClaw scans for plugins in this order (first match wins):
197208
app-server plugin is selected by `embeddedHarness.runtime: "codex"` or legacy
198209
`codex/*` model refs
199210

211+
## Troubleshooting Runtime Hooks
212+
213+
If a plugin appears in `plugins list` but `register(api)` side effects or hooks
214+
do not run in live chat traffic, check these first:
215+
216+
- Run `openclaw gateway status --deep --require-rpc` and confirm the active
217+
Gateway URL, profile, config path, and process are the ones you are editing.
218+
- Restart the live Gateway after plugin install/config/code changes. In wrapper
219+
containers, PID 1 may only be a supervisor; restart or signal the child
220+
`openclaw gateway run` process.
221+
- Use `openclaw plugins inspect <id> --json` to confirm hook registrations and
222+
diagnostics. Non-bundled conversation hooks such as `llm_input`,
223+
`llm_output`, and `agent_end` need
224+
`plugins.entries.<id>.hooks.allowConversationAccess=true`.
225+
- For model switching, prefer `before_model_resolve`. It runs before model
226+
resolution for agent turns; `llm_output` only runs after a model attempt
227+
produces assistant output.
228+
- For proof of the effective session model, use `openclaw sessions` or the
229+
Gateway session/status surfaces and, when debugging provider payloads, start
230+
the Gateway with `--raw-stream --raw-stream-path <path>`.
231+
200232
## Plugin slots (exclusive categories)
201233

202234
Some categories are exclusive (only one active at a time):

0 commit comments

Comments
 (0)