openclaw - 💡(How to fix) Fix Auto-enable persists legacy enabled keys and causes gateway restart churn [1 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#70333Fetched 2026-04-23 07:26:11
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

auto-enable writes enabled keys back into openclaw.json, causing the gateway to react to its own write and enter reload/restart churn.

Root Cause

  • Gateway activates configured built-in channels/providers at runtime without touching openclaw.json.
  • doctor --fix reports auto-enable reasoning without writing enabled flags back to disk.
  • ~/.openclaw/openclaw.json remains canonical and is not rewritten by startup or doctor.
  • No self-induced config rewrite loop.
  • No restart churn caused by reintroduced enabled keys.

Fix Action

Fix / Workaround

A local patch that makes auto-enable runtime-only was tested against 2026.4.15:

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

auto-enable writes enabled keys back into openclaw.json, causing the gateway to react to its own write and enter reload/restart churn.

Steps to reproduce

Repro: remove these keys from openclaw.json before starting:

  • channels.whatsapp.enabled
  • channels.telegram.enabled
  • plugins.entries.openai.enabled
  1. Remove the three keys above from ~/.openclaw/openclaw.json.
  2. Start the gateway (openclaw start or equivalent).
  3. Observe gateway logs — auto-enable re-introduces the keys and writes them back into openclaw.json.
  4. The gateway detects the config change it caused and begins a reload/restart cycle.

Expected behavior

  • Gateway activates configured built-in channels/providers at runtime without touching openclaw.json.
  • doctor --fix reports auto-enable reasoning without writing enabled flags back to disk.
  • ~/.openclaw/openclaw.json remains canonical and is not rewritten by startup or doctor.
  • No self-induced config rewrite loop.
  • No restart churn caused by reintroduced enabled keys.

Actual behavior

After removing channels.whatsapp.enabled, channels.telegram.enabled, and plugins.entries.openai.enabled from openclaw.json, the gateway's auto-enable logic re-adds those keys and persists them back to disk on startup. The gateway then detects its own write as a config change and enters a reload/restart churn loop.

OpenClaw version

2026.4.15

Operating system

NOT_ENOUGH_INFO

Install method

No response

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Why this is a bug

auto-enable is valid as runtime inference, but persisting it back into config reintroduces non-canonical shape, specifically:

  • channels.whatsapp.enabled
  • channels.telegram.enabled
  • plugins.entries.openai.enabled

That persisted rewrite then causes the gateway to react to its own write and enter reload/restart churn.

Proposed upstream fix

Separate runtime activation from persisted config normalization:

  • allow runtime auto-enable to remain in-memory
  • do not persist auto-enable-derived enabled flags during gateway startup
  • do not let doctor --fix write auto-enable changes back into openclaw.json
  • preserve logs / diagnostics about auto-enabled components, but keep file contents as source of truth

Local validation

A local patch that makes auto-enable runtime-only was tested against 2026.4.15:

  • removed the three problematic keys from openclaw.json
  • ran openclaw doctor --fix
  • keys were not reintroduced
  • restarted gateway
  • gateway logged runtime-only auto-enable
  • openclaw.json stayed clean

That strongly suggests the persistence step, not the activation step itself, is the core defect.

extent analysis

TL;DR

Separate runtime activation from persisted config normalization to prevent the gateway from reacting to its own writes and entering a reload/restart cycle.

Guidance

  • Identify and remove the problematic keys (channels.whatsapp.enabled, channels.telegram.enabled, plugins.entries.openai.enabled) from openclaw.json to prevent auto-enable from reintroducing them.
  • Modify the auto-enable logic to keep runtime activations in-memory and avoid persisting them to openclaw.json during gateway startup.
  • Update the doctor --fix command to report auto-enable reasoning without writing enabled flags back to disk.
  • Preserve logs and diagnostics about auto-enabled components while keeping openclaw.json as the source of truth.

Example

A local patch that makes auto-enable runtime-only can be tested by removing the problematic keys from openclaw.json, running openclaw doctor --fix, and verifying that the keys are not reintroduced.

Notes

The proposed upstream fix suggests separating runtime activation from persisted config normalization, which can be achieved by modifying the auto-enable logic and the doctor --fix command. However, the exact implementation details may vary depending on the specific requirements and constraints of the OpenClaw system.

Recommendation

Apply the workaround by modifying the auto-enable logic to keep runtime activations in-memory and avoid persisting them to openclaw.json during gateway startup, as this approach has been tested and validated locally.

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

  • Gateway activates configured built-in channels/providers at runtime without touching openclaw.json.
  • doctor --fix reports auto-enable reasoning without writing enabled flags back to disk.
  • ~/.openclaw/openclaw.json remains canonical and is not rewritten by startup or doctor.
  • No self-induced config rewrite loop.
  • No restart churn caused by reintroduced enabled keys.

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 Auto-enable persists legacy enabled keys and causes gateway restart churn [1 participants]