Repository navigation
Description
Summary
openclaw update silently overwrites user-configured agents.defaults.model and plugins.entries.* blocks, reverting them to dist-shipped defaults. Manual migrations are silently undone. There is no warning during the update, no diff displayed, and no opt-in/opt-out flag — the user only discovers the revert later when their runtime starts failing.
Repro (this user has hit it twice in 11 days)
- Migrate
agents.defaults.modelfrom API-key lane to OAuth lane, e.g.:{ "agents": { "defaults": { "model": { "primary": "openai-codex/gpt-5.5", "fallbacks": ["openai-codex/gpt-5.4", "claude-cli/claude-sonnet-4-6", "openai-codex/gpt-5.4-mini"] } } } } - Run
openclaw updateto take a later dist version (in this case 2026.5.7 → 2026.5.19). - Inspect
openclaw.jsonpost-update. The migrated values are gone; the file contains the dist's default API-key lane references (openai/gpt-5.5,openai/gpt-5.4, etc.) again.
Additionally:
- Newly-introduced plugins (e.g.
lossless-clawin 2026.5.19) ship config defaults pointing atopenai/...model strings, so any new plugin block also has to be re-migrated. - Per-agent overrides in
agents.list[*].model.primaryare likewise rewritten.
Observed sequence on this install
- 2026-05-10: Migrated all
openai/*references toopenai-codex/*. Removed all API keys. Verified end-to-end: smoke test "OAuth working" via main agent. - ~2026-05-13 to ~2026-05-19:
openclaw updateruns took the install to 2026.5.19. - 2026-05-21: First message in days landed in a routine cron path →
FailoverError: No API key found for provider "openai-codex"withrequestedProvider: "openai"(the API-key lane, not the OAuth lane). Inspection showed all migrated values reverted.
Why this is a real problem (not just a hygiene gripe)
The user has explicitly removed their API keys to enforce an OAuth-only architecture. After update, the runtime then routes to providers that have no auth at all — every cron, heartbeat, and chat invocation that goes through the front door fails until the user manually re-migrates. The user only discovers it via Slack/WhatsApp failure messages, sometimes hours or days after the revert.
In essence: an apparently safe openclaw update introduces silent regressions to authentication paths.
Workaround in use
A self-healing config overlay file (~/.openclaw/workspace/config/oauth-lane-overlay.json5) is re-applied daily via the Daily Maintenance cron using openclaw config patch --file <overlay>. Since config patch is idempotent, this restores the migration within 24h of any revert. But it shouldn't be necessary.
Suggested fix
Three options, in increasing degree of intervention:
-
Preserve user-customised model blocks. If
agents.defaults.model.primaryoragents.defaults.model.fallbacksdiffers from the dist's default before the update, do not overwrite it during update. Detect "user-customised" by comparing pre-update file content to what the prior dist version's default would have been. -
Display the diff during update. Run a dry-run config-rewrite, show the user a coloured diff of what would change, ask for confirmation before applying.
-
Add a
--preserve-configflag (or its inverse,--reset-config) so the user can opt in/out of the dist-defaults-rewrite behaviour. Default to preserve.
Option 1 is the right long-term answer. Option 2 is a good interim safeguard. Option 3 is the minimum-viable escape hatch.
Environment
- Affected: 2026.5.7 → 2026.5.12 → 2026.5.19 update path on macOS
- Auth flavour: OpenAI Codex OAuth (ChatGPT subscription) + Claude-CLI OAuth (Claude subscription)
- LaunchAgent:
ai.openclaw.gatewaywithKeepAlive=true
Related
- Prior upstream filings from this install: paperclipai/paperclip#5561, openclaw/openclaw#77458, openclaw/openclaw#82358
- Pair-bug for the same install: separately-filed
lightContext: trueexcludesexecfrom main-agent isolated cron sessions even withtoolsAllow: ['exec']set explicitly.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 21, 2026
Codex review: this still needs some work.
Summary
Keep open: an explicit closing PR remains unmerged, and shipped preservation improvements do not establish complete resolution of the reported upgrade failure.
Reproducibility: The report supplies an affected macOS upgrade sequence, but current source and the candidate's reported after-fix proof do not establish a failing current-main reproduction.
Next step
Review the existing closing candidate against shipped preservation changes and establish a failing upgrade regression for any remaining loss before repairing it.
Review details
Best possible solution:
Preserve authored settings through canonical configuration writers and Doctor migrations, with a visible Fix action if an update requires recovery.
Do we have a high-confidence way to reproduce the issue?
The report supplies an affected macOS upgrade sequence, but current source and the candidate's reported after-fix proof do not establish a failing current-main reproduction.
Is this the best way to solve the issue?
The canonical writer and migration owners are the appropriate repair boundary; determine the remaining defect before adding updater-specific replay or preservation flags.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 4cf3df6352ce.
Label changes
Label changes:
P1: The reported update loses configuration and disables agent workflows, although a current-main failure remains unverified.issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.P0: Current review triage priority is P1, so this older priority label is no longer current.issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label.maturity:stable: Current issue review selected no maturity labels.impact:ux-release-blocker: Current review impact labels areimpact:data-loss,impact:auth-provider.Label justifications:
P1: The reported update loses configuration and disables agent workflows, although a current-main failure remains unverified.impact:data-loss: The report describes persisted user-authored model and plugin settings being silently replaced.impact:auth-provider: Changed model routes leave OAuth-only workflows without usable authentication.Evidence reviewed
What I checked:
src/cli/update-cli/update-command-config.ts:333, 4cf3df6352ce)src/cli/update-cli/update-command-plugins.degradation.test.ts:335, 4cf3df6352ce)src/cli/update-cli/update-command-config.ts:40, 20bd4bdcfac4)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 15, 2026, 9:35 PM ET / October 16, 2026, 01:35 UTC.
44 remaining items
openclaw-barnacle commentedon Oct 7, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
steipete commentedon Oct 24, 2026
Thanks for filing this. We're closing older issues that no longer look actionable on current
main.Config preservation during update has improved since 2026.5.x and the revert has not been reproduced on current main. If openclaw update still overwrites your agents.defaults.model or plugins.entries on a current release, please open a fresh issue with the before/after config diff.