Skip to content

openclaw update silently reverts user-customised agents.defaults.model and plugins.entries blocks to dist defaults #85080

Closed as not planned

Description

@jaikharbanda

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)

  1. Migrate agents.defaults.model from 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"]
          }
        }
      }
    }
  2. Run openclaw update to take a later dist version (in this case 2026.5.7 → 2026.5.19).
  3. Inspect openclaw.json post-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-claw in 2026.5.19) ship config defaults pointing at openai/... model strings, so any new plugin block also has to be re-migrated.
  • Per-agent overrides in agents.list[*].model.primary are likewise rewritten.

Observed sequence on this install

  • 2026-05-10: Migrated all openai/* references to openai-codex/*. Removed all API keys. Verified end-to-end: smoke test "OAuth working" via main agent.
  • ~2026-05-13 to ~2026-05-19: openclaw update runs 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" with requestedProvider: "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:

  1. Preserve user-customised model blocks. If agents.defaults.model.primary or agents.defaults.model.fallbacks differs 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.

  2. 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.

  3. Add a --preserve-config flag (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.gateway with KeepAlive=true

Related

Activity

  1. clawsweeper commented on May 21, 2026

    @clawsweeper
    Contributor

    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:

    • No failing current-main upgrade reproduction establishes which model or plugin preservation behavior still needs repair.

    Codex review notes: model internal, reasoning medium; reviewed against 4cf3df6352ce.

    Label changes

    Label changes:

    • add P1: The reported update loses configuration and disables agent workflows, although a current-main failure remains unverified.
    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • remove P0: Current review triage priority is P1, so this older priority label is no longer current.
    • remove issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label.
    • remove maturity:stable: Current issue review selected no maturity labels.
    • remove impact:ux-release-blocker: Current review impact labels are impact: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:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 15, 2026, 9:35 PM ET / October 16, 2026, 01:35 UTC.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:data-lossCan lose, corrupt, or silently drop user/session/config data.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    on May 21, 2026
  3. added
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    and removed
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Jun 15, 2026
  4. 44 remaining items

  5. openclaw-barnacle commented on Oct 7, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  6. added
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    and removed
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    on Oct 7, 2026
  7. added
    P1High-priority user-facing bug, regression, or broken workflow.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.
    impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.
    on Oct 16, 2026
  8. steipete commented on Oct 24, 2026

    @steipete
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions