Skip to content

move_note falsely reports success for unsupported cross-workspace/cross-project moves #881

@groksrc

Description

@groksrc

Problem

Agents (e.g. Codex) expect to move a note from one workspace/project to another. Cross-workspace and cross-project moves are not supported — but instead of failing, move_note silently performs a same-project move and reports success, which misleads the agent into thinking the note crossed the boundary.

What actually happens

  1. move_note only routes project/project_id to the source project — there is no destination-project/workspace parameter anywhere in the tool, the service (entity_service.move_entity()), or the API (MoveEntityRequestV2 / PUT /v2/entities/{id}/move). The destination_path is always relative to the current project root.
  2. The existing guard _detect_cross_project_move_attempt() (src/basic_memory/mcp/tools/move_note.py:17-62) only matches when a path segment equals a known project name in the same workspace. A workspace-style path (e.g. other-workspace/projects/x/file.md) sails past it.
  3. The service then treats that as a relative path and moves the file to <current-project>/other-workspace/projects/x/file.md — a nested folder inside the same project.
  4. The tool unconditionally reports success (move_note.py:844 "moved": True, :854 "✅ Note moved successfully"). It never compares intended destination_path against the resulting result.file_path, so a cross-boundary intent that silently degraded to a same-project move looks identical to a real success.

Suggested fix

Make the tool fail loudly instead of faking success:

  • Detect cross-boundary intent and reject it with a clear error explaining cross-workspace/cross-project moves aren't supported, and the supported workaround (read_notewrite_note in the target project → delete_note in the source). Broaden detection beyond same-workspace project names to workspace/project-shaped destination paths.
  • Validate outcome vs. intent: if the resulting file_path doesn't match the move the agent expressed (e.g. the destination implied another project/workspace), error rather than report ✅.
  • At minimum, the success message must reflect what actually happened (same project, nested folder) rather than an unqualified "moved successfully."

Notes

  • Supporting real cross-workspace moves is a separate, larger feature (needs a destination-project/workspace parameter end-to-end). This issue is specifically about not reporting false success for the unsupported case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions