openclaw - 💡(How to fix) Fix Enhancement: Plugin-scoped config errors (plugins.entries.*.config) should degrade gracefully, not abort gateway startup [1 comments, 2 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#61683Fetched 2026-04-08 02:55:57
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1

When a plugins.entries.<id>.config entry contains an invalid value (e.g. a SecretRef in an unsupported surface like an MCP server env var), the gateway fails to start entirely — taking down all channels, agents, and crons even though the error is isolated to a single plugin's config.

Error Message

When a plugins.entries.<id>.config entry contains an invalid value (e.g. a SecretRef in an unsupported surface like an MCP server env var), the gateway fails to start entirely — taking down all channels, agents, and crons even though the error is isolated to a single plugin's config.

  • Log the error to that plugin's channel log

Root Cause

Config validation runs as a hard prerequisite before startChannels() is called. Plugin-scoped config errors are caught at the global validation layer rather than the plugin layer, so a single bad plugins.entries.* entry aborts the whole startup sequence.

Channel plugins already have this right — startChannels() wraps each plugin in a try/catch and continues if one fails. Plugin entry config validation doesn't get the same treatment.

RAW_BUFFERClick to expand / collapse

Summary

When a plugins.entries.<id>.config entry contains an invalid value (e.g. a SecretRef in an unsupported surface like an MCP server env var), the gateway fails to start entirely — taking down all channels, agents, and crons even though the error is isolated to a single plugin's config.

Concrete reproduction case

We had plugins.entries.acpx.config.mcpServers.atlas.env.SUPABASE_SERVICE_ROLE_KEY set to a SecretRef object (not a plain string). The MCP server env surface does not support SecretRef (src/secrets/unsupported-surface-policy.ts), so config validation threw during startup. Result: full gateway outage. Telegram went dark. All agents offline. All crons stopped.

The MCP server in question was parked and unused. A broken config on an inactive plugin killed the entire platform.

Root cause

Config validation runs as a hard prerequisite before startChannels() is called. Plugin-scoped config errors are caught at the global validation layer rather than the plugin layer, so a single bad plugins.entries.* entry aborts the whole startup sequence.

Channel plugins already have this right — startChannels() wraps each plugin in a try/catch and continues if one fails. Plugin entry config validation doesn't get the same treatment.

Expected behaviour

  1. Core gateway config errors (invalid gateway.bind, missing gateway.controlUi.allowedOrigins on non-loopback, etc.) → remain fatal. Correct.
  2. Plugin-scoped config errors (plugins.entries.<id>.config validation failures) → mark plugin as degraded, log clearly, continue startup. All other plugins and channels start normally.

Precedent

This pattern already exists in the codebase:

  • startChannels() in src/gateway/server-channels.ts wraps each channel in try/catch
  • Issue #25009 was fixed with "fix(gateway): degrade Control UI gracefully when non-loopback origin policy is missing" — same philosophy applied to a different surface

Related

  • #19992 — Pre-flight config validation / graceful degradation (broader request, this is the specific plugin-scoped slice of it)
  • #25009 — Prior precedent for graceful degradation over fatal startup errors

Proposed fix

Separate plugins.entries.* config validation from core gateway config validation. When a plugin entry fails validation:

  • Log the error to that plugin's channel log
  • Set plugin status to degraded or skip initialisation
  • Continue gateway startup

This keeps the platform online while making the problem clearly visible, rather than taking everything dark over a single misconfigured (or unused) plugin.

extent analysis

TL;DR

Separate plugin entry config validation from core gateway config validation to prevent a single misconfigured plugin from causing a full gateway outage.

Guidance

  • Identify and separate the validation logic for plugins.entries.* config from the core gateway config validation to allow for isolated error handling.
  • Implement a try/catch block around the plugin entry config validation to catch and log errors, and set the plugin status to degraded or skip initialization if validation fails.
  • Continue gateway startup after logging the error and setting the plugin status, ensuring the platform remains online.
  • Review related issues (#19992 and #25009) for broader context on pre-flight config validation and graceful degradation.

Example

// Pseudo-code example of separating plugin entry config validation
try {
  validatePluginEntryConfig(pluginConfig);
} catch (error) {
  logError(`Plugin ${pluginId} config validation failed: ${error}`);
  setPluginStatus(pluginId, 'degraded');
  // Continue gateway startup
}

Notes

This fix assumes that the validation logic for plugins.entries.* config can be separated from the core gateway config validation without introducing significant complexity or performance overhead.

Recommendation

Apply the proposed workaround by separating plugin entry config validation from core gateway config validation, as it allows for isolated error handling and prevents a single misconfigured plugin from causing a full gateway outage.

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

openclaw - 💡(How to fix) Fix Enhancement: Plugin-scoped config errors (plugins.entries.*.config) should degrade gracefully, not abort gateway startup [1 comments, 2 participants]