Skip to content

fix(doctor): replace nonexistent auth add command with openclaw onboard (#24220)#24266

Closed
lailoo wants to merge 1 commit intoopenclaw:mainfrom
lailoo:fix/doctor-auth-add-command-24220
Closed

fix(doctor): replace nonexistent auth add command with openclaw onboard (#24220)#24266
lailoo wants to merge 1 commit intoopenclaw:mainfrom
lailoo:fix/doctor-auth-add-command-24220

Conversation

@lailoo
Copy link

@lailoo lailoo commented Feb 23, 2026

Summary

  • Bug: openclaw doctor suggests nonexistent openclaw auth add --provider <X> command when memory search has no API key.
  • Root cause: noteMemorySearchHealth() in src/commands/doctor-memory-search.ts hardcodes openclaw auth add --provider ... which is not a valid CLI command.
  • Fix: Replace with openclaw onboard which is the correct general-purpose auth setup command.

Fixes #24220

Problem

When openclaw doctor detects that memory search has no embedding provider API key, it suggests:

Add credentials: openclaw auth add --provider openai

This command does not exist. Running it produces the top-level help output. The correct auth commands are openclaw models auth setup-token, openclaw models auth login --provider <X>, or openclaw onboard.

Before fix:

Fix (pick one):
- Set OPENAI_API_KEY in your environment
- Add credentials: openclaw auth add --provider openai    ← nonexistent command

Changes

  • src/commands/doctor-memory-search.ts — Replace openclaw auth add --provider <X> with openclaw onboard at lines 65 and 92.
  • src/commands/doctor-memory-search.test.ts — Add 2 regression tests verifying the suggested commands are valid.

After fix:

Fix (pick one):
- Set OPENAI_API_KEY in your environment
- Add credentials: openclaw onboard    ← valid command

Test plan

Effect on User Experience

Before: User follows doctor suggestion, runs openclaw auth add --provider openai, gets unhelpful top-level help output.
After: User follows doctor suggestion, runs openclaw onboard, enters the interactive auth setup wizard.

Greptile Summary

Fixes openclaw doctor to suggest the correct command when memory search credentials are missing. Previously suggested openclaw auth add --provider <X> which doesn't exist (the actual command structure is openclaw models auth login --provider <X> or openclaw models auth add). Now correctly suggests openclaw onboard, which is the general-purpose interactive setup wizard that handles authentication and configuration.

  • Replaced two occurrences of the nonexistent command pattern in src/commands/doctor-memory-search.ts:65 and src/commands/doctor-memory-search.ts:92
  • Added regression tests to verify the fix and prevent this issue from recurring
  • Updated CHANGELOG.md with user-facing fix description

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix is straightforward and well-tested. It replaces an incorrect command suggestion with a valid one, includes comprehensive regression tests, and follows repository conventions. The change is isolated to error messaging and doesn't affect any logic or data handling.
  • No files require special attention

Last reviewed commit: a5745dd

@steipete
Copy link
Contributor

AI-assisted stale triage closure (fix-only duplicate sweep).

This PR overlaps with #24485 for issue #24220 (doctor command guidance replacement). #24485 is the active path for this fix scope.

Closing this duplicate as AI-closed to keep one active fix PR per issue.

Reopen guidance:

@steipete steipete closed this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doctor suggests nonexistent openclaw auth add command

3 participants