OpenClaw does not install every bundled plugin dependency tree at package install time. It first derives an effective plugin plan from config and plugin metadata, then stages runtime dependencies only for bundled OpenClaw-owned plugins that the plan can actually load. This page covers packaged runtime dependencies for bundled OpenClaw plugins. Third-party plugins and custom plugin paths still use explicit plugin installation commands such asDocumentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
openclaw plugins install and
openclaw plugins update.
Responsibility split
OpenClaw owns the plan and policy:- which plugins are active for this config
- which dependency roots are writable or read-only
- when repair is allowed
- which plugin ids are staged for startup
- final checks before importing plugin runtime modules
- package graph resolution
- production, optional, and peer dependency handling
node_moduleslayout- package integrity
- lock and install metadata
pnpm or npm should
make the filesystem match that decision.
OpenClaw also owns the per-install-root coordination lock. Package managers
protect their own install transaction, but they do not serialize OpenClaw’s
manifest writes, isolated-stage copy/rename, final validation, or plugin import
against another Gateway, doctor, or CLI process touching the same runtime
dependency root.
Effective plugin plan
The effective plugin plan is derived from config plus discovered plugin metadata. These inputs can activate bundled plugin runtime dependencies:plugins.entries.<id>.enabledplugins.allow,plugins.deny, andplugins.enabled- legacy channel config such as
channels.telegram.enabled - configured providers, models, or CLI backend references that require a plugin
- bundled manifest defaults such as
enabledByDefault - the installed plugin index and bundled manifest metadata
Startup flow
Gateway startup parses config and builds the startup plugin lookup table before plugin runtime modules are loaded. Startup then stages runtime dependencies only for thestartupPluginIds selected by that plan.
For packaged installs, dependency staging is allowed before plugin import. After
staging, the runtime loader imports startup plugins with install repair disabled;
at that point missing dependency materialization is treated as a load failure,
not another repair loop.
When startup dependency staging is deferred behind the HTTP bind, Gateway
readiness stays blocked on the plugin-runtime-deps reason until the selected
startup plugin dependencies are materialized and the startup plugin runtime has
loaded.
When repair runs
Runtime dependency repair should run when one of these is true:- the effective plugin plan changed and adds bundled plugins that need runtime dependencies
- the generated dependency manifest no longer matches the effective plan
- expected installed package sentinels are missing or incomplete
openclaw doctor --fixoropenclaw plugins deps --repairwas requested
openclaw onboard and
openclaw configure do this automatically after they successfully write config,
so the next Gateway run does not discover missing bundled plugin packages after
startup has already begun. Remote onboarding/configure stays read-only for local
runtime deps.
Hot reload rule
Hot reload paths that can change active plugins must go back through plugin plan mode before loading plugin runtime. The reload should compare the new effective plugin plan with the previous one, stage missing dependencies for newly active bundled plugins, then load or restart the affected runtime. If a config reload does not change the effective plugin plan, it should not repair bundled runtime dependencies.Package manager execution
OpenClaw writes a generated install manifest for the selected bundled runtime dependencies and runs the package manager in the runtime dependency install root. It preferspnpm when available and falls back to the Node-bundled npm
runner.
The pnpm path uses production dependencies, disables lifecycle scripts, ignores
the workspace, and keeps the store inside the install root:
npm fallback uses the safe npm install wrapper with production
dependencies, lifecycle scripts disabled, workspace mode disabled, audit
disabled, fund output disabled, legacy peer dependency behavior, and package-lock
output enabled for the generated install root.
After install, OpenClaw validates the staged dependency tree before making it
visible to the runtime dependency root. Isolated staging is copied into the
runtime dependency root and validated again.
The whole repair/materialization section is guarded by an install-root lock.
Current lock owners record PID, process start-time when available, and creation
time. Legacy locks without process start-time or creation-time evidence are only
reclaimed by filesystem age, so recycled Docker PID 1 locks recover without
expiring normal long-running current installs by age alone.
Install roots
Packaged installs must not mutate read-only package directories. OpenClaw can read dependency roots from packaged layers, but writes generated runtime dependencies to a writable stage such as:OPENCLAW_PLUGIN_STAGE_DIR$STATE_DIRECTORY~/.openclaw/plugin-runtime-deps/var/lib/openclaw/plugin-runtime-depsin container-style installs
node_modules tree instead of running the
package manager again. The new versioned root still gets its own current package
runtime mirror, so plugin code comes from the current OpenClaw package while
unchanged dependency trees are shared across updates. Reuse skips previous roots
with an active OpenClaw runtime-dependency lock, so a new root does not link to a
dependency tree that another Gateway, doctor, or CLI process is currently
repairing.
Doctor and CLI commands
Useplugins deps to inspect or repair bundled plugin runtime dependency
materialization:
plugins deps and doctor operate on OpenClaw-owned bundled plugin runtime
dependencies selected by the effective plugin plan. They are not third-party
plugin install or update commands.
Troubleshooting
If a packaged install reports missing bundled runtime dependencies:- Run
openclaw plugins deps --jsonto inspect the selected plan and missing packages. - Run
openclaw plugins deps --repairoropenclaw doctor --fixto repair the writable dependency stage. - If the install root is read-only, set
OPENCLAW_PLUGIN_STAGE_DIRto a writable path and rerun repair. - Restart Gateway after repair if the missing dependency blocked startup plugin loading.
pnpm install for source dependency repair instead of using
packaged runtime dependency repair as the first step.