Merged
Size
S
Change Breakdown
Bug Fix70%
Config20%
Docs10%
#64779fix(config): resolve CLI command aliases against parent plugin in plugins.allow (#64748)

CLI plugin allow guard now resolves command aliases

A bug in the CLI plugin allow guard was causing the openclaw wiki command to enter a catch-22 with doctor --fix, constantly conflicting on whether "wiki" belonged in plugins.allow.

The CLI was blocking openclaw wiki unless wiki was added to plugins.allow, but the doctor utility would then flag wiki as a stale identifier and remove it. This created an impossible loop for users — enabling the command would trigger its own undoing on the next doctor run.

The fix operates in two places. First, the memory-wiki plugin manifest now declares wiki as a command alias, so config validation and doctor recognize it as a valid plugin-owned identifier rather than a stale plugin name. Second, the CLI fallback allow check now resolves command names through their parent plugin — if the parent plugin is in the allow list, the command is permitted even if the raw command name isn't listed.

With these changes, users can add memory-wiki to plugins.allow and the openclaw wiki command works automatically. Doctor no longer treats wiki as stale, and no manual workaround is needed to keep the command functional.

View Original GitHub Description

Summary

  • Problem: openclaw wiki CLI guard checks the command name wiki directly against plugins.allow, ignoring that wiki is a command provided by the memory-wiki plugin. Separately, memory-wiki does not declare wiki as a commandAlias, so doctor --fix treats wiki in plugins.allow as stale and removes it.
  • Why it matters: users who add wiki to plugins.allow lose it on the next doctor --fix run, and the CLI fallback guard can block openclaw wiki even when memory-wiki is allowed.
  • What changed: (1) added commandAliases: [{ "name": "wiki" }] to the memory-wiki plugin manifest so config validation and doctor recognize the alias; (2) added a parent-plugin check in the CLI fallback allow guard so commands resolve through their owning plugin.
  • What did NOT change: the primary CLI registration path (which already works for bundled plugins) is untouched.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #64748
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: resolveMissingPluginCommandMessage() resolves the command alias to its parent plugin for error messages but does not check whether that parent plugin is already in plugins.allow. The memory-wiki manifest also lacked a commandAliases entry, preventing doctor and config validation from recognizing wiki as a valid alias.
  • Missing detection / guardrail: the fallback allow check did not resolve command names through their parent plugin.
  • Contributing context: the dreaming command (memory-core) already had a commandAliases entry in its manifest, but wiki (memory-wiki) was never added.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
  • Target test or file: src/cli/run-main.test.ts
  • Scenario the test should lock in: calling resolveMissingPluginCommandMessage("wiki", { plugins: { allow: ["memory-wiki"] } }) returns null (no error).
  • Why this is the smallest reliable guardrail: the function is the single decision point for CLI command access.

User-visible / Behavior Changes

  • openclaw wiki now works when memory-wiki is in plugins.allow (no need to also add wiki).
  • doctor --fix no longer removes wiki from plugins.allow as stale; instead warns that it is a command alias for memory-wiki.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Linux (Docker), macOS
  • Runtime/container: Node 24.x
  • Model/provider: N/A (CLI-only)

Steps

  1. Set plugins.allow: ["memory-wiki"] in openclaw.json
  2. Run openclaw wiki status

Expected

  • Command runs successfully.

Actual

  • Before fix: error "plugins.allow excludes wiki" (when CLI registration fails to load)
  • After fix: command resolves through parent plugin and runs.

Evidence

  • Failing test/log before + passing after

Unit tests: 17/17 pass including 2 new cases for the allow/deny paths.

Human Verification (required)

  • Verified scenarios: unit tests pass, config validation test suite (18/18) pass, Docker build succeeds
  • Edge cases checked: command alias with parent in allow (pass-through), command alias with parent NOT in allow (blocked with correct message), no allow list set (no guard)
  • What you did not verify: macOS app build, production gateway with memory-wiki installed

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: other plugins with CLI descriptors but no commandAliases manifest entry may still hit the same issue.
    • Mitigation: this is an additive fix; other plugins can be updated the same way. The CLI guard fix also helps generically.
© 2026 · via Gitpulse