openclaw - 💡(How to fix) Fix Plugin runtime deps: support layered stage dirs for preinstalled baseline deps [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72396Fetched 2026-04-27 05:30:30
View on GitHub
Comments
2
Participants
3
Timeline
2
Reactions
0
Timeline (top)
commented ×2

Support layered plugin runtime dependency stage dirs, so OpenClaw can resolve preinstalled baseline deps from one location and install new deps into another writable location.

This helps avoid repeated slow, heavy installs while keeping new plugin deps persistent.

Root Cause

Support layered plugin runtime dependency stage dirs, so OpenClaw can resolve preinstalled baseline deps from one location and install new deps into another writable location.

This helps avoid repeated slow, heavy installs while keeping new plugin deps persistent.

RAW_BUFFERClick to expand / collapse

Summary

Support layered plugin runtime dependency stage dirs, so OpenClaw can resolve preinstalled baseline deps from one location and install new deps into another writable location.

This helps avoid repeated slow, heavy installs while keeping new plugin deps persistent.

Problem

Installing baseline plugin runtime dependencies can be very slow and heavy. On a fresh setup, OpenClaw may need to install large dependency sets before bundled plugins are ready.

This is especially painful in containerized deployments, where users often want images to start quickly and predictably. Baseline deps are known at image build time, so they should be installable once into the image. But users still need a writable persistent location for plugin deps installed later.

Today OPENCLAW_PLUGIN_STAGE_DIR appears to model this as one writable stage dir. That makes it hard to support both:

  • fast startup from preinstalled baseline deps
  • persistent installs for newly added plugin deps

Proposed Solution

Allow OPENCLAW_PLUGIN_STAGE_DIR to contain multiple paths:

OPENCLAW_PLUGIN_STAGE_DIR=<preinstalled-runtime-deps-dir>:<writable-runtime-deps-dir>

Example:

OPENCLAW_PLUGIN_STAGE_DIR=/opt/openclaw/plugin-runtime-deps:/var/lib/openclaw/plugin-runtime-deps

Behavior:

  • resolve deps by checking paths left to right
  • allow earlier paths to be read-only image paths
  • install missing deps only into the final writable path
  • keep newly installed plugin deps persistent in the user-selected writable path

Alternatives

Add a separate read-only stage dir env var, for example:

OPENCLAW_PLUGIN_STAGE_READONLY_DIR=/opt/openclaw/plugin-runtime-deps OPENCLAW_PLUGIN_STAGE_DIR=/var/lib/openclaw/plugin-runtime-deps

OpenClaw would resolve deps from both paths, but install new deps only into OPENCLAW_PLUGIN_STAGE_DIR.

This is more explicit, but it adds another config knob. Reusing OPENCLAW_PLUGIN_STAGE_DIR as a path list keeps the behavior compact and matches common PATH-style config.

Impact

  • faster startup when baseline deps are preinstalled
  • no need to reinstall heavy baseline deps at runtime
  • newly added plugin deps still persist
  • useful for Docker and other image-based deployments

Evidence/examples

Container example:

OPENCLAW_PLUGIN_STAGE_DIR=/opt/openclaw/plugin-runtime-deps:/var/lib/openclaw/plugin-runtime-deps

/opt/openclaw/plugin-runtime-deps is preinstalled in the image. /var/lib/openclaw/plugin-runtime-deps is backed by a persistent volume.

Code word: lobster-biscuit

extent analysis

TL;DR

To support layered plugin runtime dependency stage dirs, modify the OPENCLAW_PLUGIN_STAGE_DIR environment variable to contain multiple paths, separating them with colons, to enable resolving preinstalled baseline dependencies and installing new dependencies into a writable location.

Guidance

  • Set OPENCLAW_PLUGIN_STAGE_DIR to include both a read-only path for preinstalled baseline dependencies and a writable path for new dependencies, separated by a colon, e.g., OPENCLAW_PLUGIN_STAGE_DIR=/opt/openclaw/plugin-runtime-deps:/var/lib/openclaw/plugin-runtime-deps.
  • Ensure the read-only path is preinstalled with the required baseline dependencies, and the writable path is backed by a persistent volume to maintain newly installed plugin dependencies.
  • Verify that OpenClaw resolves dependencies correctly by checking the paths in the specified order and installs new dependencies only into the final writable path.
  • Consider using a separate read-only stage dir environment variable, such as OPENCLAW_PLUGIN_STAGE_READONLY_DIR, as an alternative approach, although this adds an additional configuration option.

Example

OPENCLAW_PLUGIN_STAGE_DIR=/opt/openclaw/plugin-runtime-deps:/var/lib/openclaw/plugin-runtime-deps

Notes

The proposed solution assumes that the OPENCLAW_PLUGIN_STAGE_DIR environment variable can be modified to support multiple paths. The effectiveness of this solution may depend on the specific deployment environment and the requirements of the OpenClaw application.

Recommendation

Apply the workaround by modifying the OPENCLAW_PLUGIN_STAGE_DIR environment variable to include multiple paths, as this approach is compact and matches common PATH-style configuration, allowing for faster startup times and persistent installation of new plugin dependencies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING