Skip to content

OpenClaw plugin fails all tools when its project already exists at a different path (1.0.0, after #1846) #1988

Closed

Description

@groksrc

On Basic Memory 1.0.0, the OpenClaw plugin stops working when its project already exists in a different folder than the one it expects. Every plugin tool fails, including reads and list_memory_projects. A user hit this after upgrading. Their only way out is to set projectPath by hand.

What happens

  1. The plugin's config has project: "openclaw-beru" and no projectPath.
  2. projectPath defaults to ".", which resolves to the OpenClaw workspace root (integrations/openclaw/config.ts:99-102, index.ts:151).
  3. At startup, BmClient.runStartup() calls bm_project(command="create", name=<project>, path=<projectPath>) (bm-client.ts:412, bm-client.ts:686-692).
  4. The user's openclaw-beru project is stored at <workspace>/openclaw-beru/, not at the workspace root.
  5. Since fix(mcp): refuse create_memory_project path mismatch #1846 (merged 2026-10-24, in 1.0.0), create_memory_project refuses a same-name create with a different path. Before fix(mcp): refuse create_memory_project path mismatch #1846 it answered "already exists" and reused the project.
  6. Startup throws. callTool() waits for startup (bm-client.ts:647). The retry in waitForStartup() runs the same create again and fails again. So every tool call returns the startup error.

#1846's refusal is correct in itself. The bug is that the plugin depends on the old reuse-by-name behavior, and it treats a failed create as fatal for every tool.

Reproduction (verified 2026-10-29 with bm 1.0.0, isolated config dir)

bm tool project create --name openclaw-beru --path $WS/openclaw-beru --set-default --local --json   # ok
bm tool project create --name openclaw-beru --path $WS/openclaw-beru --set-default --local --json   # ok, idempotent
bm tool project create --name openclaw-beru --path $WS --set-default --local --json                 # what plugin startup sends

The third call fails:

Error: {"error": "ALREADY_EXISTS", "message": "Project 'openclaw-beru' already exists at $WS/openclaw-beru, not $WS.", "try_instead": "another name, or bm_project(command='create', name='openclaw-beru', path='$WS/openclaw-beru')"}

What's verified and what isn't:

  • Verified by running it: the server-side refusal above.
  • Verified by reading the code only: the plugin turns that refusal into an error on every tool call. I did not run it in a live gateway.

Why upgrades hit this

The default projectPath has changed between plugin releases. In the standalone basicmachines-co/openclaw-basic-memory repo, v0.1.x–v0.2.4 used ".", while v1.0.0 used ~/.basic-memory/openclaw/. The in-repo plugin uses "." again. A project created by one release can sit somewhere other than where the next release looks. Projects created by hand or by other tools can too, as in this report.

Suggested fix

  • When projectPath is not set explicitly: if a project with the configured name already exists, use it where it is. Don't create it. Log one line naming the stored path. This brings back the pre-fix(mcp): refuse create_memory_project path mismatch #1846 behavior for the default case, without weakening fix(mcp): refuse create_memory_project path mismatch #1846.
  • When projectPath is set and differs from the stored path: keep the refusal. Show the server's message, which already names both paths and the fix.
  • Either way: a failed project create shouldn't block tools that don't need it. Read tools and list_memory_projects should still work, so the user can see what's wrong.
  • Add a note to the README / BASIC_MEMORY.md upgrade notes on how projectPath resolves and how to point it at an existing project.

Workaround

Set projectPath to the existing project's folder, e.g. projectPath: "openclaw-beru" (relative to the workspace) or an absolute path.

Source

User report from Discord, about the Basic Memory 1.0.0 upgrade. This is item 1 of 2 in that report. Item 2 is tracked separately if needed.

Activity

  1. claude commented on Oct 30, 2026

    @claude
    Contributor

    Claude finished @groksrc's task in 14s —— View job


    Triage

    • Type: Bug (regression exposed by fix(mcp): refuse create_memory_project path mismatch #1846; the OpenClaw plugin relied on the old reuse-by-name behavior)
    • Priority: High. Every plugin tool fails after upgrade, including reads and list_memory_projects. The workaround is to set projectPath by hand.
    • Component: Integrations (OpenClaw plugin: integrations/openclaw/bm-client.ts, config.ts, index.ts), with MCP tool behavior in create_memory_project as the trigger. Not Cloud-specific.
    • Complexity: Medium. The fix is small, but it touches startup semantics (an existing project at a different path versus an explicit projectPath). It also needs plugin tests and README / BASIC_MEMORY.md notes.
    • Duplicates: A search for similar issues found none.

    The report is clear and has a verified repro for the server-side refusal. The plugin-side failure path was verified by reading the code only. Before fixing, someone should confirm it in a live gateway.

    The suggested fix looks right:

    1. When projectPath is unset and the named project already exists, use it where it is and log the stored path.
    2. When projectPath is set and differs from the stored path, keep the refusal and show the server's message.
    3. A failed project create should not block tools that don't need it, such as reads and list_memory_projects.
    4. Document how projectPath resolves.

    This is triage only, so I haven't made any code changes.

  2. added a commit that references this issue on Oct 30, 2026
    727a470
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions