-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Feature: openclaw doctor --config-diff for upgrade-safe config migration #38249
Copy link
Copy link
Open
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Metadata
Metadata
Assignees
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
After upgrading OpenClaw across minor versions, community-recommended config patterns silently become invalid — they don't crash the gateway, but they don't work either. The user has no way to know which config keys from a previous version are still supported, which are renamed, and which are removed.
Real-world example
I upgraded from 2026.2.25 → 2026.3.2. Based on GitHub issues and community discussions, I applied these "recommended" optimizations:
Result:
compaction.modeonly acceptsdefaultorsafeguardin 2026.3.2 —aggressivewas silently ignoredcompaction.thresholdandtargetTokensare not recognized fields — silently ignoredagents.defaults.sessionblock is not in the schema — silently ignoredheartbeat.every: "0m"— flagged as invalid duration at runtime but accepted in the JSON fileThe config file was valid JSON,
openclaw config validatepassed (it only checks JSON syntax + known keys), but the intended optimizations were never applied. The system ran with default compaction while I believed it was running aggressive compaction — leading to continued context bloat that I spent hours debugging.Why
config validateisn't enoughconfig validateconfirms the file is parseable and known keys have valid types. It does not:Proposal
Add a
--config-diffflag toopenclaw doctor:Output:
Why this matters for the community:
Config advice drifts faster than docs. GitHub issues, Reddit posts, and Discord tips reference config keys from specific versions. Users copy-paste these without knowing they may not apply to their version. This is the fix: add @lid format support and allowFrom wildcard handling #1 source of "my optimization didn't work" confusion.
Upgrades are silent. Unlike npm (which shows breaking changes) or Docker (which warns about deprecated flags), OpenClaw upgrades don't surface config incompatibilities. The gateway starts fine, the config looks fine, but the behavior isn't what the user intended.
Complements Feature Request: Configuration Validation on Startup #32906. Issue Feature Request: Configuration Validation on Startup #32906 proposes startup validation. This proposal goes further by providing actionable migration guidance — not just "this key is bad" but "here's what to use instead and why."
Reduces support burden. A significant portion of "my agent is slow / expensive / broken after upgrade" reports likely stem from stale config. A self-service migration tool would prevent these.
Implementation sketch
schemas/(already partially exists forconfig validate)doctor --config-diffcomparesmeta.lastTouchedVersionschema against current version schema--fixflag applies safe auto-migrations (enum corrections, key renames) with backupEnvironment