You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create_memory_project reports success for an existing name with a different path #1811
create_memory_project(project_name="bm-live-throwaway-1842", project_path="<dir>/throwaway-proj-2"), when that name already exists at <dir>/throwaway-proj, returns:
The requested path is silently ignored and the result is reported as a success. Calling again with the same name and the same path is a reasonable no-op. With a different path, the tool should refuse, or at least warn that the existing project points somewhere else.
Component: MCP tools (create_memory_project). Not cloud-specific.
Priority: Medium. The tool reports success while ignoring the requested path, which can mislead an LLM or user. No data loss.
Complexity: Simple.
Duplicates: I searched for related open and closed issues and found none.
Findings: In src/basic_memory/mcp/tools/project_management.py (around lines 632–678), the existing_match branch is taken whenever the name matches. It re-requests indexing and returns "✓ Project already exists" without comparing existing_match.path to the requested project_path. This matches the report.
Likely fix direction:
Compare the requested path with existing_match.path, normalized (expanded and resolved).
If the paths are equal, keep the current idempotent no-op.
If they differ, fail fast with an error naming both paths. Refusing is better than warning, since the caller asked for something that didn't happen.
Handle the output_format == "json" branch the same way.
Add a regression test for a same-name, different-path call. Keep the same-name, same-path test as the no-op case.
Cloud projects may store paths differently, so check how existing_match.path is stored before comparing.
No reproduction steps are needed; the report is clear. I did not implement a fix, per triage scope.
Activity
claude commentedon Oct 23, 2026
Claude finished @phernandez's task in 22s —— View job
Triage
create_memory_project). Not cloud-specific.Findings: In
src/basic_memory/mcp/tools/project_management.py(around lines 632–678), theexisting_matchbranch is taken whenever the name matches. It re-requests indexing and returns "✓ Project already exists" without comparingexisting_match.pathto the requestedproject_path. This matches the report.Likely fix direction:
existing_match.path, normalized (expanded and resolved).output_format == "json"branch the same way.existing_match.pathis stored before comparing.No reproduction steps are needed; the report is clear. I did not implement a fix, per triage scope.
test(mcp): cover create_memory_project path mismatch
fix(mcp): refuse create_memory_project path mismatch
test(mcp): cover create_memory_project path mismatch
docs(core): add unreleased 1.0 changes to the changelog (#1871)
fix(mcp): refuse create_memory_project path mismatch
test(mcp): port project management tests to bm_project (#1961)