Skip to content

openclaw plugin: packaging fixes for OpenClaw 2026.9.6 compatibility (openclaw.extensions + activation.onStartup) #4357

Open

Description

@gaowei68cn

TITLE: openclaw plugin: packaging fixes for OpenClaw 2026.9.6 compatibility (openclaw.extensions + activation.onStartup)

Summary

The bundled OpenClaw plugin (openclaw/) does not work out of the box on OpenClaw 2026.9.6. Two packaging fields required by the current OpenClaw manifest contract are missing, and together they cause install failure and/or silent no-op at startup:

  1. package.json is missing openclaw.extensions → install is rejected outright.
  2. openclaw.plugin.json is missing activation.onStartup → even when install succeeds, the plugin is never imported during Gateway startup, so its before_tool_call hook is never wired into tool dispatch.

Part 1 — package.json missing openclaw.extensions

Reproduction

$ openclaw plugins install ./openclaw --link --force
package.json missing openclaw.extensions; update the plugin package to include
openclaw.extensions (for example ["./dist/index.js"]). See
https://docs.openclaw.ai/help/troubleshooting#plugin-install-fails-with-missing-openclaw-extensions

Suggested fix

"openclaw": {
  "extensions": ["./index.ts"]
}

Part 2 — openclaw.plugin.json missing activation.onStartup

Per OpenClaw's manifest docs:

Omitting onStartup no longer startup-loads the plugin implicitly; use explicit activation metadata for startup … triggers.

Symptom chain (observed)

  1. Gateway restart → plugin module is not imported at startup; register() never runs; no hook is registered.
  2. openclaw plugins reload hot-reloads metadata and does import the module later — but hooks registered this way are not picked up by the hook runner instance the Gateway captured at startup (verified via module-load side effects: reload imports the module, yet the hook never fires for real tool calls).
  3. Net effect: plugins list shows enabled, plugins inspect --runtime reports hookCount: 1, but before_tool_call never fires. The plugin looks installed while doing nothing.

Suggested fix

"activation": {
  "onStartup": true
}

Verified end to end (with both fixes applied)

  • Gateway startup imports the module (register() runs in the Gateway PID)
  • before_tool_call fires on every exec
  • ls -la is rewritten to rtk ls -la silently (rc build returns exit 0 with RTK_REWRITE_HOST=openclaw, no duplicate approval prompt)
  • Output comes back in RTK compact format

Environment

  • rtk: develop branch @ 6d4b77e (and v0.50.0 release tarball for Part 1)
  • Host: OpenClaw 2026.9.6 (eb377ac), node v24.18.0, WSL2 / Linux x86_64

Activity

  1. added
    bug
    good first issue
    on Sep 30, 2026
  2. rtk-wshm-sync-bot commented on Sep 30, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 94%

    Summary

    Bundled openclaw plugin fails to install/activate on OpenClaw 2026.9.6 due to missing openclaw.extensions in package.json and activation.onStartup in openclaw.plugin.json; fix and verification steps provided.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • openclaw/package.json
    • openclaw/openclaw.plugin.json

    Suggested Actions

    1. Add openclaw.extensions: ["./index.ts"] to openclaw/package.json
    2. Add activation.onStartup: true to openclaw/openclaw.plugin.json
    3. Cross-check against prior fix PR fix(openclaw): fix plugin install — add openclaw.extensions, document --dangerously-force-unsafe-install #1236 (stale) and PR fix(openclaw): make the rewrite plugin work end-to-end on OpenClaw 2026.6.x #2392 for similar prior packaging fixes
    4. Re-verify before_tool_call fires after Gateway restart, not just after plugins reload

    Triaged automatically by wshm · This is an automated analysis, not a human review.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configbuggood first issuepriority:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions