Skip to content

fix: add memory search health check to openclaw doctor#16294

Merged
Takhoffman merged 2 commits into
openclaw:mainfrom
superlowburn:fix/doctor-memory-search-warning
Feb 14, 2026
Merged

fix: add memory search health check to openclaw doctor#16294
Takhoffman merged 2 commits into
openclaw:mainfrom
superlowburn:fix/doctor-memory-search-warning

Conversation

@superlowburn

@superlowburn superlowburn commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new noteMemorySearchHealth() check to openclaw doctor that detects when memory search is enabled but no embedding provider is configured
  • Uses config-only detection (no network calls) via resolveApiKeyForProvider() and local model path checks
  • Displays actionable fix suggestions with specific commands for each scenario

What it checks

The new check handles 4 scenarios:

  1. Memory search explicitly disabled (enabled: false) — brief info note, not a warning
  2. Provider set to local but no model file found — suggests configuring local model or switching to remote
  3. Specific remote provider set but no API key — names the missing env var and suggests openclaw auth add
  4. Provider set to auto (default) and no provider available — generic guidance listing all fix options

Each note ends with openclaw memory status --deep as the verify command.

Why

Users expect persistent memory to work after setup, but without an embeddings provider configured, memory search silently fails. Users blame "AI forgot" when really they need to configure an embedding provider. This check surfaces the issue during openclaw doctor with specific, actionable fix guidance.

Design decisions

  • Config-only, no network calls — keeps doctor fast; memory status --deep already does runtime probing
  • Uses resolveApiKeyForProvider() — same resolution path as the embedding system (checks config profiles, keychain, env vars, config file), avoiding false positives from only checking env vars
  • Respects intentional disable — if enabled: false, shows a brief note rather than a warning
  • Follows existing patterns — structured like doctor-security.ts (builds message, calls note())

Scope

This PR addresses the openclaw doctor portion of #13027. Onboarding wizard enhancements and runtime warnings mentioned in the issue are left as future work.

Test plan

  • TypeScript compilation passes (0 errors in changed files)
  • Existing doctor e2e tests pass (6/6)
  • Linter passes (0 warnings, 0 errors)
  • Manual test: run openclaw doctor without any API keys configured — verify warning appears
  • Manual test: run openclaw doctor with OPENAI_API_KEY set — verify no warning
  • Manual test: set agents.defaults.memorySearch.enabled: false — verify info note appears

Closes #13027

🤖 Generated with Claude Code

Greptile Overview

Greptile Summary

Adds a new health check to openclaw doctor that detects misconfigured memory search embeddings providers and displays actionable fix suggestions. The implementation follows existing doctor check patterns, uses config-only detection (no network calls), and handles all major scenarios: explicitly disabled memory search, local models (missing files), specific remote providers (missing API keys), and auto-detection fallback. The code correctly integrates with existing auth resolution logic and provides clear, specific guidance for each failure mode.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is well-structured, follows existing patterns from other doctor checks, uses appropriate error handling (try-catch blocks), has no breaking changes, and only adds a new non-invasive health check. TypeScript compilation passes with no errors, linting passes, and the logic correctly handles all edge cases (null checks, provider mapping, file existence checks). The only issue found is a minor comment accuracy improvement.
  • No files require special attention

Last reviewed commit: d871c04

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S labels Feb 14, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

// Remote/downloadable models (hf: or http:) aren't pre-resolved on disk,
// so we can't confirm availability without a network call. Treat as
// potentially available — the user configured it intentionally.
if (/^(hf:|https?:)/i.test(modelPath)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

regex allows both http: and https: but the comment only mentions http:, update comment to include both

Suggested change
if (/^(hf:|https?:)/i.test(modelPath)) {
// Remote/downloadable models (hf: or http:/https:) aren't pre-resolved on disk,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/doctor-memory-search.ts
Line: 100:100

Comment:
regex allows both `http:` and `https:` but the comment only mentions `http:`, update comment to include both

```suggestion
  // Remote/downloadable models (hf: or http:/https:) aren't pre-resolved on disk,
```

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

superlowburn and others added 2 commits February 14, 2026 10:45
When memory search is enabled but no embedding provider is configured,
openclaw doctor now warns with actionable fix suggestions instead of
letting users discover the misconfiguration through silent recall failures.

Closes #13027

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@Takhoffman
Takhoffman force-pushed the fix/doctor-memory-search-warning branch from d871c04 to 7c4e955 Compare February 14, 2026 17:01
@Takhoffman
Takhoffman merged commit 69ba9a0 into openclaw:main Feb 14, 2026
39 of 40 checks passed
@Takhoffman

Copy link
Copy Markdown
Contributor

PR #16294 - fix: add memory search health check to openclaw doctor (#16294)

Merged via squash.

  • Merge commit: 69ba9a0
  • Verified: pnpm install --frozen-lockfile, pnpm build, pnpm check, pnpm test
  • Changes made:
    src/commands/doctor-memory-search.test.ts
    src/commands/doctor-memory-search.ts
    src/commands/doctor.ts
  • Changelog: CHANGELOG.md updated=false required=false opt_out=true

Thanks @superlowburn!

akoscz pushed a commit to akoscz/openclaw that referenced this pull request Feb 15, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
GwonHyeok pushed a commit to learners-superpumped/openclaw that referenced this pull request Feb 15, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Twynzen pushed a commit to Twynzen/sendell-clawd that referenced this pull request Feb 15, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
(cherry picked from commit 69ba9a0)
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
(cherry picked from commit 69ba9a0)
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
… thanks @superlowburn

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test (noted unrelated local flakes)

Co-authored-by: superlowburn <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Onboarding/doctor should clearly warn when memory_search is disabled (missing embeddings provider/key)

2 participants