Repository navigation
fix(onboard): preserve named-agent profiles during config resets - #127716
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where users resetting only their OpenClaw configuration could not reuse an existing provider profile for a named first agent. For example,
openclaw onboard --reset --reset-scope config --agent-name robby --auth-choice apiKey --token-provider anthropicincorrectly rejected setup as missing a profile even though the preservedrobbyagent already owned one.Why This Change Was Made
Reset preflight correctly validates against the future empty configuration, but it previously resolved provider profiles without the future agent identity or selected workspace, implicitly looking under
main. Resolve the pending post-reset target through the existing canonical onboarding owner and carry its agent directory and workspace into both plugin-provider and custom-provider validation. Configuration-only resets may reuse preserved profiles; reset scopes that delete credentials continue to fail before changing state.User Impact
Operators can reconfigure an existing named agent without reentering a provider key when requesting a configuration-only reset. Named-agent normalization, inherited
mainprofiles, default-agent setup, selected workspaces, and destructive-reset safety retain their existing behavior.Evidence
The exact unmodified production owner reproduced both failures before the fix: plugin and custom validation each received no agent directory and no selected workspace. An actual installed
models auth --agent robbycommand created a real isolated named-only SQLite provider profile; both actualonboardandsetupthen exited 1 before reset despite that preserved profile. Replaying the repaired exact current validation in the same installed commands accepts the named profile and proceeds through reset. The available older installed executable cannot finish the unrelated later agent-creation phase because its obsolete roster lifecycle predates named-first-agent support; the current complete production owner independently passes all ten named/default/custom/workspace/reset-scope checks. A five-row owner-boundary regression coversrobby, normalizedRobby!, defaultmain, configuration-only profile reuse, and both credential-destructive reset scopes; the test file is one line smaller after consolidating duplicate existing cases. Existing inherited-mainCLI behavior remains compatible. Changed-file formatting, scoped lint, offline TruffleHog scanning, independent architecture review, and independent Codex autoreview all pass. Production delta: +17/-2; tests: +73/-74.