openclaw - 💡(How to fix) Fix [Bug]: `openclaw configure` (upgrade wizard) writes __OPENCLAW_REDACTED__ literals into openclaw.json, corrupting all API keys [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#62281Fetched 2026-04-08 03:06:43
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

When running openclaw configure during an upgrade from 2026.4.2 to 2026.4.5, the wizard rewrites openclaw.json with literal __OPENCLAW_REDACTED__ strings replacing actual API keys. After the upgrade crashes/fails and the user rolls back to 2026.4.2, the config file is left with corrupted credentials, causing all services to fail silently.

Error Message

  • All affected API providers fail silently — no error message indicates the config is corrupted

Root Cause

  • #60021 — Same root cause via Control UI config save
  • #44357 — Same pattern with SecretRef fields (closed)
  • #11355 — Same pattern with macOS app (closed)

Fix Action

Workaround

Manually edit ~/.openclaw/openclaw.json to replace all __OPENCLAW_REDACTED__ strings with actual API keys. Cannot use config.patch as it also rejects the sentinel.

RAW_BUFFERClick to expand / collapse

Summary

When running openclaw configure during an upgrade from 2026.4.2 to 2026.4.5, the wizard rewrites openclaw.json with literal __OPENCLAW_REDACTED__ strings replacing actual API keys. After the upgrade crashes/fails and the user rolls back to 2026.4.2, the config file is left with corrupted credentials, causing all services to fail silently.

Related Issues

  • #60021 — Same root cause via Control UI config save
  • #44357 — Same pattern with SecretRef fields (closed)
  • #11355 — Same pattern with macOS app (closed)

This appears to be a recurring regression. The redaction-on-read mechanism is leaking into write paths.

Environment

  • OpenClaw version: 2026.4.2 (rolled back from 2026.4.5)
  • OS: macOS 15.3.0 (arm64), Mac mini M4 Pro
  • Install method: npm global
  • Trigger: openclaw configure wizard during upgrade to 2026.4.5

Steps to Reproduce

  1. Running OpenClaw 2026.4.2 with multiple providers configured (Dashscope, Volcengine, SiliconFlow, Brave, etc.)
  2. Run upgrade to 2026.4.5 — upgrade wizard (openclaw configure) runs automatically
  3. Upgrade crashes/fails mid-process
  4. Roll back to 2026.4.2
  5. Observe: openclaw.json now contains "apiKey": "__OPENCLAW_REDACTED__" for multiple providers

Affected Config Paths

The following fields were corrupted (replaced with literal __OPENCLAW_REDACTED__):

  • models.providers.volccodingplan.apiKey
  • agents.defaults.memorySearch.remote.apiKey
  • plugins.entries.brave.config.webSearch.apiKey
  • gateway.remote.password

Fields That Were NOT Affected

  • models.providers.bailian.apiKey (survived intact)
  • channels.feishu.appSecret (survived intact)
  • channels.telegram.accounts.main.botToken (survived intact)
  • channels.telegram.accounts.programming.botToken (survived intact)
  • gateway.auth.token (survived intact)

This inconsistency suggests the wizard selectively re-serializes some fields through the redaction layer while preserving others.

Impact

  • All affected API providers fail silently — no error message indicates the config is corrupted
  • memory_search returns 401 — embedding provider key corrupted
  • config.patch refuses to work — rejects its own __OPENCLAW_REDACTED__ sentinel: Reserved redaction sentinel "__OPENCLAW_REDACTED__" is not valid config data
  • Manual JSON editing required — users must hand-edit openclaw.json to restore keys
  • Version mismatch warning loopmeta.lastTouchedVersion is set to the failed upgrade version (2026.4.5) while running 2026.4.2

Expected Behavior

openclaw configure should never write __OPENCLAW_REDACTED__ literals to disk. The write path should either:

  1. Preserve original values for fields the user did not modify, OR
  2. Re-read secrets from the source of truth before writing

Workaround

Manually edit ~/.openclaw/openclaw.json to replace all __OPENCLAW_REDACTED__ strings with actual API keys. Cannot use config.patch as it also rejects the sentinel.

Additional Context

The meta.lastTouchedVersion and wizard.lastRunVersion fields were set to 2026.4.5 even though the upgrade failed, causing persistent "Config was last written by a newer OpenClaw" warnings on every command.

The config file also retained stale plugin entries (e.g., comfy) that existed in the pre-upgrade config but whose plugins were removed in the target version, adding to the confusion during troubleshooting.

extent analysis

TL;DR

Manually editing the openclaw.json file to replace __OPENCLAW_REDACTED__ strings with actual API keys is the most likely fix for the corrupted configuration issue.

Guidance

  • Identify the affected fields in openclaw.json that contain __OPENCLAW_REDACTED__ and replace them with the original API keys.
  • Verify that the openclaw configure wizard does not overwrite the corrected fields during subsequent runs.
  • Consider creating a backup of the corrected openclaw.json file to prevent data loss in case of future issues.
  • Be cautious when editing the openclaw.json file, as incorrect changes can cause further configuration issues.

Example

No code snippet is provided, as the issue is related to configuration file editing rather than code changes.

Notes

The root cause of the issue appears to be a bug in the openclaw configure wizard that causes it to write __OPENCLAW_REDACTED__ literals to the configuration file. This bug seems to be a recurring regression, as mentioned in the related issues.

Recommendation

Apply the workaround by manually editing the openclaw.json file to replace the corrupted fields, as a fix is not available in the current version. This will allow users to restore their configuration and continue using OpenClaw until a permanent fix is released.

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 [Bug]: `openclaw configure` (upgrade wizard) writes __OPENCLAW_REDACTED__ literals into openclaw.json, corrupting all API keys [1 comments, 2 participants]