Skip to content

fix(cli): replace stale doctor/restart command hints#24485

Merged
mukhtharcm merged 2 commits intoopenclaw:mainfrom
chilu18:chore/next-small-fixes
Feb 24, 2026
Merged

fix(cli): replace stale doctor/restart command hints#24485
mukhtharcm merged 2 commits intoopenclaw:mainfrom
chilu18:chore/next-small-fixes

Conversation

@chilu18
Copy link
Contributor

@chilu18 chilu18 commented Feb 23, 2026

Summary

  • replace stale restart hint openclaw gateway status --probe --deep with valid openclaw gateway status --deep
  • replace nonexistent openclaw auth add --provider ... doctor guidance with valid interactive command openclaw configure --section auth
  • add regression tests for both hint paths

Why

Validation

  • corepack pnpm exec vitest run src/commands/doctor-memory-search.test.ts src/cli/daemon-cli/lifecycle.test.ts
  • corepack pnpm exec oxfmt --check src/commands/doctor-memory-search.ts src/commands/doctor-memory-search.test.ts src/cli/daemon-cli/lifecycle.ts src/cli/daemon-cli/lifecycle.test.ts src/cli/update-cli/update-command.ts

Greptile Summary

This PR fixes stale command hints by replacing the invalid openclaw gateway status --probe --deep with the correct openclaw gateway status --deep (the --probe flag doesn't exist; probing is enabled by default via --no-probe opt-out). It also replaces the nonexistent openclaw auth add --provider command with an interactive configuration command.

Issues Found

  • Critical: The PR uses openclaw configure --section auth, but this section doesn't exist. The valid section for configuring provider credentials is model (see src/commands/configure.shared.ts:54 and src/commands/configure.wizard.ts:387,440). This will cause runtime errors when users try the suggested command.

What Works Well

  • Correctly removes the invalid --probe flag from openclaw gateway status --deep
  • Correctly suggests openclaw doctor as a valid troubleshooting command
  • Adds proper test coverage for the hint paths
  • The lifecycle test correctly validates the hints array

Confidence Score: 1/5

  • This PR introduces a critical bug that will provide users with invalid command suggestions
  • The PR correctly fixes the --probe flag issue but introduces a new bug by referencing a non-existent --section auth configuration section. Users following the suggested command will encounter errors. The correct section name is model.
  • Pay close attention to src/commands/doctor-memory-search.ts and its test file - they both reference an invalid configuration section

Last reviewed commit: 526ca18

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

"Fix (pick one):",
`- Set ${envVar} in your environment`,
`- Add credentials: ${formatCliCommand(`openclaw auth add --provider ${resolved.provider}`)}`,
`- Configure credentials: ${formatCliCommand("openclaw configure --section auth")}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--section auth is not a valid section. Should be --section model (which handles "Pick provider + credentials" per src/commands/configure.shared.ts:54)

Suggested change
`- Configure credentials: ${formatCliCommand("openclaw configure --section auth")}`,
`- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/doctor-memory-search.ts
Line: 65

Comment:
`--section auth` is not a valid section. Should be `--section model` (which handles "Pick provider + credentials" per `src/commands/configure.shared.ts:54`)

```suggestion
        `- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
```

How can I resolve this? If you propose a fix, please make it concise.

"Fix (pick one):",
"- Set OPENAI_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY, or MISTRAL_API_KEY in your environment",
`- Add credentials: ${formatCliCommand("openclaw auth add --provider openai")}`,
`- Configure credentials: ${formatCliCommand("openclaw configure --section auth")}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue - --section auth should be --section model

Suggested change
`- Configure credentials: ${formatCliCommand("openclaw configure --section auth")}`,
`- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/doctor-memory-search.ts
Line: 92

Comment:
same issue - `--section auth` should be `--section model`

```suggestion
      `- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
```

How can I resolve this? If you propose a fix, please make it concise.


expect(note).toHaveBeenCalledTimes(1);
const message = String(note.mock.calls[0]?.[0] ?? "");
expect(message).toContain("openclaw configure --section auth");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test expects wrong section name - should check for model not auth

Suggested change
expect(message).toContain("openclaw configure --section auth");
expect(message).toContain("openclaw configure --section model");
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/doctor-memory-search.test.ts
Line: 142

Comment:
test expects wrong section name - should check for `model` not `auth`

```suggestion
    expect(message).toContain("openclaw configure --section model");
```

How can I resolve this? If you propose a fix, please make it concise.


expect(note).toHaveBeenCalledTimes(1);
const message = String(note.mock.calls[0]?.[0] ?? "");
expect(message).toContain("openclaw configure --section auth");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test expects wrong section name - should check for model not auth

Suggested change
expect(message).toContain("openclaw configure --section auth");
expect(message).toContain("openclaw configure --section model");
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/doctor-memory-search.test.ts
Line: 158

Comment:
test expects wrong section name - should check for `model` not `auth`

```suggestion
    expect(message).toContain("openclaw configure --section model");
```

How can I resolve this? If you propose a fix, please make it concise.

@chilu18
Copy link
Contributor Author

chilu18 commented Feb 23, 2026

All required checks are green and merge state is CLEAN. This is ready for maintainer merge when convenient.

@mukhtharcm mukhtharcm force-pushed the chore/next-small-fixes branch from 02b7ec9 to 989abf1 Compare February 24, 2026 07:58
@mukhtharcm mukhtharcm merged commit 097a6a8 into openclaw:main Feb 24, 2026
25 checks passed
plgs2005 pushed a commit to plgs2005/openclaw that referenced this pull request Feb 24, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
margulans pushed a commit to margulans/Neiron-AI-assistant that referenced this pull request Feb 25, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
brianleach pushed a commit to brianleach/openclaw that referenced this pull request Feb 26, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
Get-windy pushed a commit to Get-windy/JieZi-ai-PS that referenced this pull request Feb 28, 2026
更新内容:
- fix(ui): prevent tabnabbing in chat images (openclaw#18685)
- fix(cli): replace stale doctor/restart command hints (openclaw#24485)
- Auto-reply: normalize stop matching + multilingual triggers (openclaw#25103)
- docs: fix broken links, add maintainer
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
joelnishanth pushed a commit to joelnishanth/openclaw that referenced this pull request Mar 3, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (openclaw#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants