openclaw - ✅(Solved) Fix [Bug]: 4.23 validator rejects plugins.entries.moltguard.hooks.allowConversationAccess while error message demands it [1 pull requests, 3 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

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#71621Fetched 2026-04-26 05:10:31
View on GitHub
Comments
3
Participants
4
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×3cross-referenced ×2closed ×1labeled ×1

On 2026.4.23, the gateway's typed-hook block error instructs users to set plugins.entries.<plugin>.hooks.allowConversationAccess=true, but adding that exact key causes the config validator to reject it with Unrecognized key: "allowConversationAccess" and auto-restore the prior config; reproduced once on Ubuntu 24.04 with @openguardrails/[email protected].

Error Message

On 2026.4.23, the gateway's typed-hook block error instructs users to set plugins.entries.<plugin>.hooks.allowConversationAccess=true, but adding that exact key causes the config validator to reject it with Unrecognized key: "allowConversationAccess" and auto-restore the prior config; reproduced once on Ubuntu 24.04 with @openguardrails/[email protected]. (No grounded reference to a prior version where this exact config path was accepted; only observed that the error message and the validator schema disagree on the same key in 2026.4.23.) In dist/loader-<hash>.js (hash varies per build), both literal forms .allowConversationAccess and .hooks.allowConversationAccess appear. The runtime hook-block error message generator references the hooks.allowConversationAccess path, but the user-facing config validator does not appear to expose that key in the accepted schema, suggesting the error message generator and the config validator schema are defined in separate modules and one was updated without the other.

  1. Sync the config validator schema with the error message generator: add hooks.allowConversationAccess (and hooks.allowPromptInjection by symmetry) to accepted keys under plugins.entries.<plugin> so the documented remediation actually works.
  2. At minimum, update the error message to match what the validator currently accepts, so users have an actionable path even if the underlying restriction is intentional.

Root Cause

  1. Upgrade OpenClaw to 2026.4.23.
  2. Install a non-bundled plugin that registers typed hooks: openclaw plugins install @openguardrails/moltguard. Confirm plugins.entries.moltguard.enabled: true in ~/.openclaw/openclaw.json.
  3. Reload openclaw-gateway. Gateway log shows typed hook "agent_end" blocked because non-bundled plugins must set plugins.entries.moltguard.hooks.allowConversationAccess=true (and the same for llm_input, llm_output).
  4. Add "hooks": { "allowConversationAccess": true } under plugins.entries.moltguard in openclaw.json and save.
  5. Gateway auto-reload emits Unrecognized key: "allowConversationAccess" and Config auto-restored from last-known-good: openclaw.json (reload-invalid-config). The file on disk is overwritten back to the prior state.

Fix Action

Fix / Workaround

Affected users/systems/channels: Any deployment using non-bundled plugins that register typed hooks (agent_end, llm_input, llm_output) on 2026.4.23. Confirmed with @openguardrails/[email protected] (current npm latest). Severity: Blocks security guardrails. Operators who rely on MoltGuard or similar non-bundled hook plugins cannot run them on 2026.4.23 without disabling protection entirely. Frequency: Always (1/1 reproduction on a clean upgrade to 2026.4.23). Consequence: Forced to set plugins.entries.moltguard.enabled: false to silence the typed-hook block log spam, forfeiting all guardrail functionality until a fix is released.

Workaround in use: plugins.entries.moltguard.enabled: false. Plugin remains in plugins.allow and on disk; only the runtime activation is gated.

PR fix notes

PR #71679: test(config): cover allowConversationAccess in plugin hooks schema validation (#71621)

Description (problem / solution / changelog)

Summary

Adds test coverage for in the config validator schema.

Context: Issue #71621 reported that the gateway's typed-hook block error tells users to set , but the validator rejects the key with . The schema fix was already committed to separately. This PR adds the missing unit test coverage for the boolean values in the schema validation.

Changes:

  • Added coverage for in
  • Added a combined case with + to ensure the two options compose correctly

Test results: 57/57 tests pass

Closes #71621

Changed files

  • src/agents/model-ref-shared.test.ts (added, +16/-0)
  • src/agents/model-ref-shared.ts (modified, +3/-0)
  • src/config/config-misc.test.ts (modified, +17/-1)

Code Example

Gateway log on enabling moltguard with `plugins.entries.moltguard.enabled: true` (no `hooks` key):

  [plugins] [moltguard] Platform: active (autonomous mode)
  [gateway] [plugins] typed hook "agent_end" blocked because non-bundled plugins must set
    plugins.entries.moltguard.hooks.allowConversationAccess=true
    (plugin=moltguard, source=/home/<user>/.openclaw/extensions/moltguard/dist/index.js)
  [gateway] [plugins] typed hook "llm_input" blocked  (same reason)
  [gateway] [plugins] typed hook "llm_output" blocked  (same reason)
  [gateway] ready (4 plugins: browser, claude-delegator, discord, moltguard; 1.0s)

Gateway log after adding `plugins.entries.moltguard.hooks.allowConversationAccess: true`:

  Unrecognized key: "allowConversationAccess"
  Config auto-restored from last-known-good: openclaw.json (reload-invalid-config)

SDK type definitions present in the installed package (paths shown to help locate the relevant code):

  dist/plugin-sdk/src/plugins/registry.d.ts:
    type PluginTypedHookPolicy = {
      allowPromptInjection?: boolean;
      allowConversationAccess?: boolean;
    };

  dist/plugin-sdk/src/plugins/status.d.ts:
    policy: {
      allowPromptInjection?: boolean;
      allowConversationAccess?: boolean;
      allowModelOverride?: boolean;
      allowedModels: string[];
      hasAllowedModelsConfig: boolean;
    };

In `dist/loader-<hash>.js` (hash varies per build), both literal forms `.allowConversationAccess` and `.hooks.allowConversationAccess` appear. The runtime hook-block error message generator references the `hooks.allowConversationAccess` path, but the user-facing config validator does not appear to expose that key in the accepted schema, suggesting the error message generator and the config validator schema are defined in separate modules and one was updated without the other.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On 2026.4.23, the gateway's typed-hook block error instructs users to set plugins.entries.<plugin>.hooks.allowConversationAccess=true, but adding that exact key causes the config validator to reject it with Unrecognized key: "allowConversationAccess" and auto-restore the prior config; reproduced once on Ubuntu 24.04 with @openguardrails/[email protected].

Steps to reproduce

  1. Upgrade OpenClaw to 2026.4.23.
  2. Install a non-bundled plugin that registers typed hooks: openclaw plugins install @openguardrails/moltguard. Confirm plugins.entries.moltguard.enabled: true in ~/.openclaw/openclaw.json.
  3. Reload openclaw-gateway. Gateway log shows typed hook "agent_end" blocked because non-bundled plugins must set plugins.entries.moltguard.hooks.allowConversationAccess=true (and the same for llm_input, llm_output).
  4. Add "hooks": { "allowConversationAccess": true } under plugins.entries.moltguard in openclaw.json and save.
  5. Gateway auto-reload emits Unrecognized key: "allowConversationAccess" and Config auto-restored from last-known-good: openclaw.json (reload-invalid-config). The file on disk is overwritten back to the prior state.

Expected behavior

NOT_ENOUGH_INFO

(No grounded reference to a prior version where this exact config path was accepted; only observed that the error message and the validator schema disagree on the same key in 2026.4.23.)

Actual behavior

Adding plugins.entries.moltguard.hooks.allowConversationAccess: true to ~/.openclaw/openclaw.json causes the gateway auto-reload to log Unrecognized key: "allowConversationAccess" followed by Config auto-restored from last-known-good: openclaw.json (reload-invalid-config). The file on disk is overwritten back to the prior state. With the key absent, the gateway repeatedly logs typed hook "agent_end" blocked because non-bundled plugins must set plugins.entries.moltguard.hooks.allowConversationAccess=true (and the same for llm_input, llm_output), and the plugin's hooks are not invoked.

OpenClaw version

2026.4.23 (commit a979721)

Operating system

Ubuntu 24.04

Install method

npm global

Model

Gemma 4 31B IT UD-Q4_K_XL via llama-server (b8870, ROCm). Model is not relevant to this bug; the failure is in plugin config validation, independent of the LLM in use.

Provider / routing chain

openclaw -> llama-server (local, http://127.0.0.1:11437, OpenAI-compatible)

Additional provider/model setup details

Local llama-server (b8870, ROCm) on the same host. No remote provider, no proxy, no router. Relevant config lives in ~/.openclaw/openclaw.json under models.providers.<localname>. Provider/model setup is not relevant to this bug; the failure is in plugin config validation.

Logs, screenshots, and evidence

Gateway log on enabling moltguard with `plugins.entries.moltguard.enabled: true` (no `hooks` key):

  [plugins] [moltguard] Platform: active (autonomous mode)
  [gateway] [plugins] typed hook "agent_end" blocked because non-bundled plugins must set
    plugins.entries.moltguard.hooks.allowConversationAccess=true
    (plugin=moltguard, source=/home/<user>/.openclaw/extensions/moltguard/dist/index.js)
  [gateway] [plugins] typed hook "llm_input" blocked  (same reason)
  [gateway] [plugins] typed hook "llm_output" blocked  (same reason)
  [gateway] ready (4 plugins: browser, claude-delegator, discord, moltguard; 1.0s)

Gateway log after adding `plugins.entries.moltguard.hooks.allowConversationAccess: true`:

  Unrecognized key: "allowConversationAccess"
  Config auto-restored from last-known-good: openclaw.json (reload-invalid-config)

SDK type definitions present in the installed package (paths shown to help locate the relevant code):

  dist/plugin-sdk/src/plugins/registry.d.ts:
    type PluginTypedHookPolicy = {
      allowPromptInjection?: boolean;
      allowConversationAccess?: boolean;
    };

  dist/plugin-sdk/src/plugins/status.d.ts:
    policy: {
      allowPromptInjection?: boolean;
      allowConversationAccess?: boolean;
      allowModelOverride?: boolean;
      allowedModels: string[];
      hasAllowedModelsConfig: boolean;
    };

In `dist/loader-<hash>.js` (hash varies per build), both literal forms `.allowConversationAccess` and `.hooks.allowConversationAccess` appear. The runtime hook-block error message generator references the `hooks.allowConversationAccess` path, but the user-facing config validator does not appear to expose that key in the accepted schema, suggesting the error message generator and the config validator schema are defined in separate modules and one was updated without the other.

Impact and severity

Affected users/systems/channels: Any deployment using non-bundled plugins that register typed hooks (agent_end, llm_input, llm_output) on 2026.4.23. Confirmed with @openguardrails/[email protected] (current npm latest). Severity: Blocks security guardrails. Operators who rely on MoltGuard or similar non-bundled hook plugins cannot run them on 2026.4.23 without disabling protection entirely. Frequency: Always (1/1 reproduction on a clean upgrade to 2026.4.23). Consequence: Forced to set plugins.entries.moltguard.enabled: false to silence the typed-hook block log spam, forfeiting all guardrail functionality until a fix is released.

Additional information

Workaround in use: plugins.entries.moltguard.enabled: false. Plugin remains in plugins.allow and on disk; only the runtime activation is gated.

Suggested resolution directions (rough priority):

  1. Sync the config validator schema with the error message generator: add hooks.allowConversationAccess (and hooks.allowPromptInjection by symmetry) to accepted keys under plugins.entries.<plugin> so the documented remediation actually works.
  2. Promote canonical guardrail plugins (e.g. MoltGuard) to bundled status so they bypass the non-bundled typed-hook restriction; the wording "non-bundled plugins must set..." implies bundled plugins are exempt.
  3. At minimum, update the error message to match what the validator currently accepts, so users have an actionable path even if the underlying restriction is intentional.

Last-known-good for non-bundled hook plugins: NOT_ENOUGH_INFO (have not tested 4.22.x with @openguardrails/moltguard on this host).

Related: this report is independent of #63732 (heartbeat/cron daily reset regression in 4.x), but both surface in 2026.4.23 and together leave operators with reduced protection (no MoltGuard) and unbounded session growth.

extent analysis

TL;DR

The most likely fix is to update the config validator schema to include the hooks.allowConversationAccess key under plugins.entries.<plugin>.

Guidance

  • Verify that the error message generator and config validator schema are in sync, as they seem to be defined in separate modules.
  • Check the dist/plugin-sdk/src/plugins/registry.d.ts and dist/plugin-sdk/src/plugins/status.d.ts files to confirm the presence of the allowConversationAccess key in the PluginTypedHookPolicy and policy types.
  • Consider promoting canonical guardrail plugins (e.g., MoltGuard) to bundled status to bypass the non-bundled typed-hook restriction.
  • Update the error message to match what the validator currently accepts, providing an actionable path for users.

Example

No code snippet is provided as the issue is related to configuration and schema validation.

Notes

The issue seems to be specific to the 2026.4.23 version of OpenClaw, and the workaround is to set plugins.entries.moltguard.enabled: false, which disables the plugin's functionality.

Recommendation

Apply a workaround by setting plugins.entries.moltguard.enabled: false until a fix is released, as the issue blocks security guardrails and has a high severity impact.

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…

FAQ

Expected behavior

NOT_ENOUGH_INFO

(No grounded reference to a prior version where this exact config path was accepted; only observed that the error message and the validator schema disagree on the same key in 2026.4.23.)

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: 4.23 validator rejects plugins.entries.moltguard.hooks.allowConversationAccess while error message demands it [1 pull requests, 3 comments, 4 participants]