Note: This issue was written with AI assistance, based on a real usage session.
Bug Description
On macOS with the default case-insensitive APFS volume, renaming notes or folders so that only the letter case changes misbehaves when done through the MCP tools. Several distinct problems: a case-only file rename is rejected, a case-only folder rename silently doesn't change the folder's case on disk, directory moves leave empty orphan directories behind, and case-only renames leave duplicate entries in the index that a normal sync won't clear.
Steps To Reproduce
- Install version
0.22.1, vault on default case-insensitive APFS.
- File rename: call
move_note to rename config.md → Config.md (same folder, only case differs).
- Folder rename: call
move_note (directory) to rename a folder reviews → Reviews.
- Let the server sync / restart it, then
list_directory; also inspect the folder on disk.
Expected Behavior
- A case-only rename succeeds via
move_note (a plain mv config.md Config.md / Finder does it fine).
- A case-only folder rename actually changes the folder's case on disk.
- Directory moves remove the emptied source directory.
- No duplicate/phantom index entries result.
Actual Behavior
move_note refuses the case-only file rename with Move Failed - Destination Already Exists — its destination-exists check treats the case-insensitive-equal path as an existing file. Requires a two-step rename via a temporary name to work around.
- The case-only folder rename reports success but doesn't change the folder's case on disk — the files end up back in the pre-existing lowercase directory; only the index briefly reflects the new case. (A
mv on the folder does work.)
- Directory moves leave the emptied source directory behind on disk. After a directory move, the original (now empty) folder remains — e.g. an empty
debuggng/ is left after its contents move to Debugging/ — so renames accumulate orphan empty folders.
- Duplicate index entries: after renaming, every affected note appears twice in
list_directory — once under the new-cased path, once under the old-cased path — and an incremental sync / server restart does not remove the stale ones (they even get re-dated). Running bm reindex --full rebuilds from the filesystem and clears them.
Environment
- OS: macOS 26.6.1 (default case-insensitive APFS)
- Python version: 3.14.7
- Basic Memory version: 0.22.1
- Installation method: Homebrew
- Client: MCP (streamable-http transport)
Additional Context
Possible Solution
Treat a case-insensitive same-path destination as the same file in move_note (allow the rename), remove the emptied source directory on a directory move, and make sync reconcile case-only path changes so duplicates aren't created / are pruned — rather than relying on a full reindex.
Bug Description
On macOS with the default case-insensitive APFS volume, renaming notes or folders so that only the letter case changes misbehaves when done through the MCP tools. Several distinct problems: a case-only file rename is rejected, a case-only folder rename silently doesn't change the folder's case on disk, directory moves leave empty orphan directories behind, and case-only renames leave duplicate entries in the index that a normal sync won't clear.
Steps To Reproduce
0.22.1, vault on default case-insensitive APFS.move_noteto renameconfig.md→Config.md(same folder, only case differs).move_note(directory) to rename a folderreviews→Reviews.list_directory; also inspect the folder on disk.Expected Behavior
move_note(a plainmv config.md Config.md/ Finder does it fine).Actual Behavior
move_noterefuses the case-only file rename withMove Failed - Destination Already Exists— its destination-exists check treats the case-insensitive-equal path as an existing file. Requires a two-step rename via a temporary name to work around.mvon the folder does work.)debuggng/is left after its contents move toDebugging/— so renames accumulate orphan empty folders.list_directory— once under the new-cased path, once under the old-cased path — and an incremental sync / server restart does not remove the stale ones (they even get re-dated). Runningbm reindex --fullrebuilds from the filesystem and clears them.Environment
Additional Context
mv/Finder perform these case-only renames fine, so this is about the tool/index behavior, not a filesystem limitation.bm reindex --full -p <project>(incremental sync alone does not). Orphan empty directories must be removed manually (e.g.rmdir).Possible Solution
Treat a case-insensitive same-path destination as the same file in
move_note(allow the rename), remove the emptied source directory on a directory move, and make sync reconcile case-only path changes so duplicates aren't created / are pruned — rather than relying on a full reindex.