Skip to content

[Feature]: Add file-based fallback search when node:sqlite is unavailable #59451

Description

@rrrrrredy

Summary

This issue tracks only the longer-term fallback path when vector search cannot initialize because node:sqlite is unavailable.

Immediate UX fix (actionable error message + remediation guidance) is tracked separately in #59457. The current active PR for that narrower fix is #69199.

Background

In some container/sandbox runtimes, the built-in node:sqlite module is unavailable even when OpenClaw is otherwise usable. Right now that blocks vector search entirely.

Expected Behavior

  1. When node:sqlite is unavailable, memory_search falls back to a simple file-based keyword search over MEMORY.md and memory/*.md.
  2. The tool response should make it clear that the result came from fallback keyword search rather than vector search.
  3. The fallback should preserve basic recall instead of returning an unavailable response for every query.

Why This Matters

This is a capability-preservation issue, not just an error-message issue. Even with the better UX from #59457 / #69199, memory recall still becomes unavailable in constrained runtimes unless there is a fallback path.

Out of Scope

Implementation Note

A simple grep/file-scan fallback over MEMORY.md + memory/*.md would be a reasonable first step. This does not need to match vector-search quality; it only needs to preserve a basic searchable memory path when SQLite-backed search cannot start.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions