openclaw - ✅(Solved) Fix [Bug]: Downgrading from 2026.4.x to 2026.3.2 leaves openclaw.json in invalid/broken state with no warning [1 pull requests, 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#72527Fetched 2026-04-28 06:34:55
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

When downgrading from OpenClaw 2026.4.x back to 2026.3.2, the openclaw.json written by the newer version contains keys and value formats that are invalid in 2026.3.2. The gateway starts with silent config errors that break Discord channel connectivity and LLM responses, with no actionable guidance.

Error Message

2026.4.x adds agents.defaults.imageGenerationModel to openclaw.json. 2026.3.2 does not recognize this key and rejects the config block. Additionally, removing it manually leaves a trailing comma in the JSON (since it was the last key in the object), resulting in a JSON syntax error that silently breaks model routing. The Discord channel crashes on startup due to error #3, leaving the bot offline.

Root Cause

When downgrading from OpenClaw 2026.4.x back to 2026.3.2, the openclaw.json written by the newer version contains keys and value formats that are invalid in 2026.3.2. The gateway starts with silent config errors that break Discord channel connectivity and LLM responses, with no actionable guidance.

Fix Action

Workaround

Manually edit openclaw.json to:

  1. Remove agents.defaults.imageGenerationModel
  2. Fix the resulting trailing comma
  3. Change tools.web.search.provider back to "gemini"
  4. Change channels.discord.streaming from { "mode": "off" } back to "off"
  5. Remove 2026.4.x-only plugin entries from plugins.entries

PR fix notes

PR #72535: fix(config): add actionable hints to version-mismatch warning on downgrade

Description (problem / solution / changelog)

Problem

When a user downgrades from a newer OpenClaw version (e.g. 2026.4.24 → 2026.3.2), openclaw.json may contain keys and value formats written by the newer binary that are invalid in the older schema. The gateway currently emits:

Config was last written by a newer OpenClaw (2026.4.24); current version is 2026.3.2.

...but gives no guidance on what to do next. Users are left with cryptic Invalid config errors and a non-functional Discord channel (see #72527).

Fix

Extend warnIfConfigFromFuture to include actionable follow-up hints:

  1. Run openclaw doctor --fix — this already calls stripUnknownConfigKeys which removes keys the current Zod schema doesn't recognise (e.g. agents.defaults.imageGenerationModel added in 2026.4.x).
  2. Note about value-format changes — some known keys had their value format changed between versions (e.g. channels.discord.streaming migrated from a plain string to an object in 2026.4.x). These cannot be auto-stripped and require manual correction; the warning now says so explicitly.

Before / After

Before:

Config was last written by a newer OpenClaw (2026.4.24); current version is 2026.3.2.

After:

Config was last written by a newer OpenClaw (2026.4.24); current version is 2026.3.2. Some config keys or value formats may be incompatible with this version. Run "openclaw doctor --fix" to strip unrecognized keys automatically. Keys whose value format changed between versions (e.g. channels.*.streaming) may require manual correction after stripping.

Related

  • Closes #72527
  • The Windows ESM Discord crash that triggered real-world downgrade traffic: #71749 (fixed in 2026.4.25-beta.4)

Testing

Existing warnIfConfigFromFuture call sites are covered by integration tests in io.ts. No behaviour change for the happy path (same-version or forward configs). The warning is only emitted when shouldWarnOnTouchedVersion returns true.

Changed files

  • src/config/io.ts (modified, +6/-1)

Code Example

Invalid config: agents.defaults: Unrecognized key: "imageGenerationModel"

---

Invalid config: tools.web.search.provider: Invalid input (allowed: "brave", "perplexity", "grok", "gemini", "kimi")

---

Invalid config: channels.discord.streaming: Invalid input (allowed: true, false, "off", "partial", "block", "progress")
RAW_BUFFERClick to expand / collapse

Summary

When downgrading from OpenClaw 2026.4.x back to 2026.3.2, the openclaw.json written by the newer version contains keys and value formats that are invalid in 2026.3.2. The gateway starts with silent config errors that break Discord channel connectivity and LLM responses, with no actionable guidance.

Environment

  • OS: Windows 11
  • Node.js: v25.5.0
  • Downgraded from: 2026.4.24 → 2026.3.2

Steps to Reproduce

  1. Run OpenClaw 2026.4.24 — it auto-migrates openclaw.json with new keys
  2. Downgrade: npm install -g [email protected] (e.g. due to the Windows Discord ESM crash in #71749)
  3. Restart OpenClaw
  4. Observe openclaw doctor output

What Goes Wrong

openclaw doctor reports three classes of errors, none of which have an automated fix:

1. Unrecognized key: imageGenerationModel

2026.4.x adds agents.defaults.imageGenerationModel to openclaw.json. 2026.3.2 does not recognize this key and rejects the config block. Additionally, removing it manually leaves a trailing comma in the JSON (since it was the last key in the object), resulting in a JSON syntax error that silently breaks model routing.

Invalid config: agents.defaults: Unrecognized key: "imageGenerationModel"

2. Invalid tools.web.search.provider value

2026.4.x adds "tavily" as a valid search provider. 2026.3.2 only accepts "brave", "perplexity", "grok", "gemini", "kimi".

Invalid config: tools.web.search.provider: Invalid input (allowed: "brave", "perplexity", "grok", "gemini", "kimi")

3. Invalid channels.discord.streaming format

2026.4.x migrates "streaming": "off" (string) to "streaming": { "mode": "off" } (object). 2026.3.2 only accepts the string form.

Invalid config: channels.discord.streaming: Invalid input (allowed: true, false, "off", "partial", "block", "progress")

The Discord channel crashes on startup due to error #3, leaving the bot offline.

4. Stale plugin entries (warnings, not errors)

2026.4.x adds plugin entries for tavily, google, openai, anthropic, browser to plugins.entries. These generate warnings in 2026.3.2 but are silently ignored, cluttering the log.

Expected Behavior

  • openclaw doctor (or startup) detects that openclaw.json was written by a newer version and warns the user clearly:

    ⚠️ Config was last written by OpenClaw 2026.4.24; current version is 2026.3.2. Some keys may be invalid. Run openclaw doctor --fix to migrate down.

  • openclaw doctor --fix should be able to strip/rewrite incompatible keys for the current version, or at minimum list exactly which keys need manual removal.
  • The JSON output of doctor --fix should never produce invalid JSON (trailing comma issue).

Workaround

Manually edit openclaw.json to:

  1. Remove agents.defaults.imageGenerationModel
  2. Fix the resulting trailing comma
  3. Change tools.web.search.provider back to "gemini"
  4. Change channels.discord.streaming from { "mode": "off" } back to "off"
  5. Remove 2026.4.x-only plugin entries from plugins.entries

Suggested Fix / PR Opportunity

  • Add a "minVersion" or "writtenByVersion" field to openclaw.json and check it on startup
  • Implement downgrade-aware config migration in doctor --fix (strip keys unknown to current version, rewrite changed value formats)
  • Guard JSON serialization so removed keys never leave trailing commas

Happy to test a fix on Windows 11 + Node 25.

extent analysis

TL;DR

Manually editing openclaw.json to remove incompatible keys and fix value formats is the most likely fix for resolving configuration errors after downgrading from OpenClaw 2026.4.x to 2026.3.2.

Guidance

  • Remove agents.defaults.imageGenerationModel from openclaw.json and fix any resulting trailing commas to prevent JSON syntax errors.
  • Update tools.web.search.provider to a value compatible with 2026.3.2, such as "gemini".
  • Change channels.discord.streaming from an object to a string, using a value like "off", to match the expected format in 2026.3.2.
  • Consider removing plugin entries for tavily, google, openai, anthropic, and browser from plugins.entries to reduce log clutter, although this is not critical for functionality.

Example

No code snippet is provided as the issue is primarily related to configuration file editing.

Notes

The provided workaround involves manual editing of the openclaw.json file. Implementing a version check and automated config migration in openclaw doctor --fix could provide a more robust solution for future downgrades.

Recommendation

Apply the workaround by manually editing openclaw.json as described, to immediately resolve the configuration errors and restore functionality. This approach is recommended because it directly addresses the identified issues without requiring updates to OpenClaw itself.

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 - ✅(Solved) Fix [Bug]: Downgrading from 2026.4.x to 2026.3.2 leaves openclaw.json in invalid/broken state with no warning [1 pull requests, 1 participants]