-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
models auth login overwrites and truncates main openclaw.json; auth-profiles.json silently wipes existing profiles #88565
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.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:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.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:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Version: OpenClaw 2026.5.28 (
e932160)Platform: Windows (PowerShell)
Severity: High — main config truncation prevented only by size-drop guard; auth-profiles silently loses existing profiles
Summary
openclaw models auth login --provider <name>has two independent destructive behaviors:openclaw.json(it shouldn't — should only touchauth-profiles.json), shrinking it from ~28KB to ~9KB. The size-drop guard catches and rejects the write, but that's the only thing preventing data loss.auth-profiles.jsonin a way that drops pre-existing profiles for other providers, rather than merging.Additionally, the
typefield only accepts"api_key"(snake_case);"apiKey"(camelCase) is silently ignored.Reproduction
Expected
auth-profiles.jsongets a newopenai:defaultprofile merged indeepseek:defaultprofile is preservedopenclaw.jsonis untouchedActual
Symptom 1:
openclaw.jsonwrite rejectedThe size-drop guard is the only thing preventing complete config truncation.
Symptom 2:
auth-profiles.jsonprofiles wipedAfter the command,
auth-profiles.jsoncontains only the newly-added provider — the previously workingdeepseek:default(and any others) are gone.Symptom 3: camelCase
typesilently ignoredIf the file is manually edited with
"type": "apiKey", the profile is silently ignored with no error — only"type": "api_key"works.Impact
Suggested Fix
models auth loginshould write only toauth-profiles.json, never toopenclaw.jsonauth-profiles.jsonwrites should merge with existing profiles, not overwritetypefield should normalize camelCaseapiKey→api_key, or at minimum reject with a clear error