openclaw - 💡(How to fix) Fix [Bug]: PluginEntrySchema zod schema missing allowConversationAccess — non-bundled plugins cannot use conversation hooks [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#73307Fetched 2026-04-29 06:21:09
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1labeled ×1

Non-bundled plugins (e.g., openclaw-observability) are blocked from using conversation-related typed hooks (like llm_input, llm_output) because the zod schema for PluginEntrySchema does not include allowConversationAccess, despite the runtime code (loader-DeOtDUYt.js) checking for it. This means the documented configuration path plugins.entries.<pluginId>.hooks.allowConversationAccess=true triggers a schema validation error, making it impossible to grant conversation access to non-bundled plugins without manually patching the s Environment • OpenClaw version: 2026.4.23 (commit a979721) • Installation: npm global (/Users/<user>/.local/lib/node_modules/openclaw/) • OS: macOS (reproducible on any platform)

Error Message

This means the documented configuration path plugins.entries.<pluginId>.hooks.allowConversationAccess=true triggers a schema validation error, making it impossible to grant conversation access to non-bundled plugins without manually patching the s level: "warn",

Root Cause

Non-bundled plugins (e.g., openclaw-observability) are blocked from using conversation-related typed hooks (like llm_input, llm_output) because the zod schema for PluginEntrySchema does not include allowConversationAccess, despite the runtime code (loader-DeOtDUYt.js) checking for it. This means the documented configuration path plugins.entries.<pluginId>.hooks.allowConversationAccess=true triggers a schema validation error, making it impossible to grant conversation access to non-bundled plugins without manually patching the s Environment • OpenClaw version: 2026.4.23 (commit a979721) • Installation: npm global (/Users/<user>/.local/lib/node_modules/openclaw/) • OS: macOS (reproducible on any platform)

Fix Action

Fix / Workaround

Non-bundled plugins (e.g., openclaw-observability) are blocked from using conversation-related typed hooks (like llm_input, llm_output) because the zod schema for PluginEntrySchema does not include allowConversationAccess, despite the runtime code (loader-DeOtDUYt.js) checking for it. This means the documented configuration path plugins.entries.<pluginId>.hooks.allowConversationAccess=true triggers a schema validation error, making it impossible to grant conversation access to non-bundled plugins without manually patching the s Environment • OpenClaw version: 2026.4.23 (commit a979721) • Installation: npm global (/Users/<user>/.local/lib/node_modules/openclaw/) • OS: macOS (reproducible on any platform)

Temporary Workaround Manually patched zod-schema-BhKK4qYw.js to add the missing field:

js hooks: z.object({ allowPromptInjection: z.boolean().optional(), allowConversationAccess: z.boolean().optional() // ← added }).strict().optional(), After this patch, the configuration is accepted and conversation hooks work correctly.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Non-bundled plugins (e.g., openclaw-observability) are blocked from using conversation-related typed hooks (like llm_input, llm_output) because the zod schema for PluginEntrySchema does not include allowConversationAccess, despite the runtime code (loader-DeOtDUYt.js) checking for it. This means the documented configuration path plugins.entries.<pluginId>.hooks.allowConversationAccess=true triggers a schema validation error, making it impossible to grant conversation access to non-bundled plugins without manually patching the s Environment • OpenClaw version: 2026.4.23 (commit a979721) • Installation: npm global (/Users/<user>/.local/lib/node_modules/openclaw/) • OS: macOS (reproducible on any platform)

Steps to reproduce

1、Install a non-bundled plugin that uses conversation hooks, e.g.:

          openclaw plugins install openclaw-observability
2、Attempt to grant conversation access in ~/.openclaw/openclaw.json:
json

{
  "plugins": {
	    "entries": {
	      "openclaw-observability": {
	        "enabled": true,
	        "hooks": {
	          "allowConversationAccess": true
	        }
	     }
	    }
	  }
	}

Run openclaw gateway status or start the gateway.

Expected behavior

The configuration is accepted, and the non-bundled plugin can receive llm_input, llm_output, and other conversation hooks.

Actual behavior

Invalid config at /Users/<user>/.openclaw/openclaw.json:

  • plugins.entries.openclaw-observability.hooks: Unrecognized key: "allowConversationAccess" If allowConversationAccess is not set, the gateway blocks the hook at runtime: [plugins] typed hook "llm_input" blocked because non-bundled plugins must set plugins.entries.openclaw-observability.hooks.allowConversationAccess=true This creates a deadlock: setting the config key fails schema validation, but not setting it blocks the hook at runtime.

Root Cause Analysis I traced the issue through the source code. Here's the relevant code paths:

  1. Runtime check — loader-DeOtDUYt.js (line ~1286–1301) The runtime correctly reads allowConversationAccess from entry.hooks:

js // policy comes from entry?.hooks (confirmed via grep: // "hookPolicy: entry?.hooks" and // "on: (hookName, handler, opts) => registerTypedHook(record, hookName, handler, opts, params.hookPolicy)") if (isConversationHookName(hookName)) { const explicitConversationAccess = policy?.allowConversationAccess; if (record.origin !== "bundled" && explicitConversationAccess !== true) { pushDiagnostic({ level: "warn", pluginId: record.id, source: record.source, message: typed hook "${hookName}" blocked because non-bundled plugins must set plugins.entries.${record.id}.hooks.allowConversationAccess=true }); return; } // ... } 2. Schema definition — zod-schema-BhKK4qYw.js (line ~1293–1300) The PluginEntrySchema zod schema only defines allowPromptInjection, not allowConversationAccess:

js // Current (buggy) schema: const PluginEntrySchema = z.object({ enabled: z.boolean().optional(), hooks: z.object({ allowPromptInjection: z.boolean().optional() // ← only this! }).strict().optional(), subagent: z.object({ ... }).strict().optional(), config: z.record(z.string(), z.unknown()).optional() }).strict(); 3. Config schema validation The plugins config block uses .strict():

js plugins: z.object({ // ... entries: z.record(z.string(), PluginEntrySchema).optional(), // ... }).strict().optional(), Since PluginEntrySchema uses .strict() and only allows allowPromptInjection in the hooks sub-object, any attempt to add allowConversationAccess fails validation.

Temporary Workaround Manually patched zod-schema-BhKK4qYw.js to add the missing field:

js hooks: z.object({ allowPromptInjection: z.boolean().optional(), allowConversationAccess: z.boolean().optional() // ← added }).strict().optional(), After this patch, the configuration is accepted and conversation hooks work correctly.

Suggested Fix Add allowConversationAccess to the hooks sub-object in PluginEntrySchema. The corrected schema should be:

js const PluginEntrySchema = z.object({ enabled: z.boolean().optional(), hooks: z.object({ allowPromptInjection: z.boolean().optional(), allowConversationAccess: z.boolean().optional() // ← add this }).strict().optional(), subagent: z.object({ allowModelOverride: z.boolean().optional(), allowedModels: z.array(z.string()).optional() }).strict().optional(), config: z.record(z.string(), z.unknown()).optional() }).strict(); The source file should be somewhere like src/plugins/config-schema.ts or wherever PluginEntrySchema is defined in the TypeScript source.

Additional Notes The openclaw-observability plugin's openclaw.plugin.json declares llm_input and llm_output in its slots array, so these hooks are expected to work.

The hooks config path for plugin entries is distinct from the top-level hooks.internal.entries used for hook packs — these serve different purposes.

Other config keys like allowPromptInjection work correctly through the same mechanism; only allowConversationAccess is missing from the schema.

Severity: Medium — Prevents non-bundled plugins from using conversation hooks, forcing users to either use bundled plugins only or manually patch the schema.

Suggested label: bug, plugin-system, good first issue

OpenClaw version

2026.4.23

Operating system

mac OS 15.4

Install method

No response

Model

Minimax M2.5

Provider / routing chain

openclaw-alibaba cloud - Minimax M2.5

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The most likely fix is to update the PluginEntrySchema to include the missing allowConversationAccess field in the hooks sub-object.

Guidance

  1. Verify the schema definition: Check the zod-schema-BhKK4qYw.js file to confirm that the PluginEntrySchema only defines allowPromptInjection and not allowConversationAccess.
  2. Update the schema: Modify the PluginEntrySchema to include the allowConversationAccess field in the hooks sub-object, as suggested in the issue.
  3. Test the configuration: After updating the schema, attempt to grant conversation access to a non-bundled plugin using the plugins.entries.<pluginId>.hooks.allowConversationAccess=true configuration path.
  4. Verify plugin functionality: Test the non-bundled plugin to ensure it can receive conversation hooks like llm_input and llm_output.

Example

const PluginEntrySchema = z.object({
  enabled: z.boolean().optional(),
  hooks: z.object({ 
    allowPromptInjection: z.boolean().optional(),
    allowConversationAccess: z.boolean().optional()  // Add this line
  }).strict().optional(),
  // ...
}).strict();

Notes

The provided temporary workaround suggests manually patching the zod-schema-BhKK4qYw.js file, but a more permanent solution would involve updating the PluginEntrySchema in the source code.

Recommendation

Apply the suggested fix by updating the PluginEntrySchema to include the allowConversationAccess field, as this will allow non-bundled plugins to use conversation hooks without manual patching.

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

The configuration is accepted, and the non-bundled plugin can receive llm_input, llm_output, and other conversation hooks.

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 - 💡(How to fix) Fix [Bug]: PluginEntrySchema zod schema missing allowConversationAccess — non-bundled plugins cannot use conversation hooks [2 comments, 3 participants]