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
The --project flag seems to be ignored when running certain commands. This is a problem especially when trying to run scoped MCP server with uvx basic-memory --project=... mcp.
Steps To Reproduce
Steps to reproduce the behavior:
Install version 0.12.3
Run command bm project add work ~/basic-memory/work
Use tool/feature bm --project=work project info or bm --project=work sync
See that both commands don't apply to the work project, but to the default one, main.
Expected Behavior
--project flag is respected in all commands.
Actual Behavior
--project flag is not respected in all commands, including, apparently, mcp command. Which means to change projects one must do bm project default other_project instead.
Hi @wreed4 and also @wtfzambo, thanks for reporting this. I've been working on a new release that includes this fix. The code is ready, but I'm working on some docs and other info. If you want to upgrade to the latest beta, you can do so.
uv tool upgrade basic-memory --prerelease=allow
The final v0.13.0 release should be out very shortly. One of the major changes in the new version is that all projects use a single shared db to index data. Consequently, you don't have to set the project at mcp startup, and there are tools available to add/remove/set projects via the LLM. The cli flags are fixed, however.
question.. is there a way to disable the switching projects tools? I would like to be able to use different memory bases for different agents, without the ability for memory to leak between agents. Using a project as a security boundary would be a very useful capability. Plus, if the agent can change projects, but it's previously read information from project 1 into its context, there seems like there'd be a pretty high likihood for it to "leak" memories into project 2 . Is there a solution to avoid this behavior?
Evaluate configuration options for disabling project tools
Provide recommendation with pros/cons
Context:@wreed4 raised a valid concern about using projects as security boundaries to prevent memory leakage between different agents. The question is whether to add configuration options to disable project switching and cross-project operations.
Current Cross-Project Capabilities
I've analyzed the MCP tools and found two main categories of cross-project functionality:
2. Content Tools with Cross-Project Access
All content tools accept project: Optional[str] = None parameter:
write_note(), read_note(), search_notes(), edit_note(), etc.
When project parameter is provided, operation executes in that project instead of current session
Tools use get_active_project(project_override) function to determine target project
Security/Isolation Analysis
Current Isolation:
✅ Each project has separate database and file system
✅ Projects can't accidentally access each other's data without explicit parameters
Current Vulnerabilities:
❌ No access control - any user can switch to any project
❌ Cross-project operations via optional parameters
❌ Global session state affects all subsequent operations
❌ Project discovery via list_projects()
Recommendation: Add Configuration Controls
I recommend adding the following configuration options to BasicMemoryConfig:
# Project security settingsdisable_project_switching: bool=Field(
default=False,
description="Disable tools that allow switching between projects"
)
disable_cross_project_operations: bool=Field(
default=False,
description="Disable project parameter in content tools"
)
restrict_project_discovery: bool=Field(
default=False,
description="Prevent listing all available projects"
)
Implementation Strategy:
Project Management Tool Filtering - Conditionally register/exclude tools based on config
Parameter Validation - Reject project parameters in content tools when disabled
Session Lock - Prevent session project changes when switching is disabled
Benefits:
✅ Maintains security boundaries for multi-agent scenarios
✅ Prevents accidental cross-project contamination
✅ Backward compatible (defaults preserve current behavior)
✅ Granular control over different aspects of cross-project functionality
Trade-offs:
⚠️ Reduces flexibility for legitimate multi-project workflows
⚠️ Adds complexity to configuration
⚠️ May confuse users who expect full cross-project access
This approach addresses @wreed4's security concerns while maintaining flexibility for users who need cross-project functionality.
Summary: I've analyzed the current cross-project capabilities and recommend adding granular configuration options to disable project switching and cross-project operations when security isolation is needed, while preserving backward compatibility.
The original bug reported in this issue (the --project flag being ignored) has been fixed in v0.13.0. The CLI commands now properly respect the --project flag as expected.
You can verify this is working with the current stable release:
uv tool upgrade basic-memory
bm --project=work project info # Now works correctly
🆕 Feature Request Separated
The discussion in this issue evolved into a feature request for project isolation controls to disable project switching for security purposes. I've created a separate focused issue for this feature:
@phernandez, on 0.14.x now.. the flags seem broken again. I've tried to set up my agent to only be able to use one project, and all notes it adds are in my default project. I need to be able to run multiple isolated knowledge bases on the same host.
Activity
fix: Make --project flag work consistently across CLI commands
feat: implement frontmatter tag search and fix failing tests
wreed4 commentedon Jun 9, 2025
can confirm. This is a pretty big blocker to adopting this tool as it stands.
phernandez commentedon Jun 9, 2025
Hi @wreed4 and also @wtfzambo, thanks for reporting this. I've been working on a new release that includes this fix. The code is ready, but I'm working on some docs and other info. If you want to upgrade to the latest beta, you can do so.
The final v0.13.0 release should be out very shortly. One of the major changes in the new version is that all projects use a single shared db to index data. Consequently, you don't have to set the project at mcp startup, and there are tools available to add/remove/set projects via the LLM. The cli flags are fixed, however.
You can see the pre-release release notes here: https://github.com/basicmachines-co/basic-memory/blob/main/RELEASE_NOTES_v0.13.0.md
wtfzambo commentedon Jun 9, 2025
Awesome @phernandez , thanks for the update!
wreed4 commentedon Jun 11, 2025
awesome @phernandez .
question.. is there a way to disable the switching projects tools? I would like to be able to use different memory bases for different agents, without the ability for memory to leak between agents. Using a project as a security boundary would be a very useful capability. Plus, if the agent can change projects, but it's previously read information from project 1 into its context, there seems like there'd be a pretty high likihood for it to "leak" memories into project 2 . Is there a solution to avoid this behavior?
phernandez commentedon Jun 11, 2025
@wreed4 Are you asking to disable project switching and cross project tools?
You can disable tools individually in Claude desktop now.
I'd have to add an extra config setting to disable other project args. from the tools. It could be done easily.
phernandez commentedon Jun 11, 2025
@claude what do you think about disabling project tools?either adding a project setting to
claude commentedon Jun 11, 2025
Claude finished @phernandez's task in 2m 45s —— View job
Analysis: Disabling Project Tools
Todo List:
Context: @wreed4 raised a valid concern about using projects as security boundaries to prevent memory leakage between different agents. The question is whether to add configuration options to disable project switching and cross-project operations.
Current Cross-Project Capabilities
I've analyzed the MCP tools and found two main categories of cross-project functionality:
1. Project Management Tools (
project_management.py)list_projects()- Lists all available projectsswitch_project(project_name)- Changes active sessionget_current_project()- Shows current projectset_default_project()- Changes default project globallycreate_project()/delete_project()- Manage projects2. Content Tools with Cross-Project Access
All content tools accept
project: Optional[str] = Noneparameter:write_note(),read_note(),search_notes(),edit_note(), etc.projectparameter is provided, operation executes in that project instead of current sessionget_active_project(project_override)function to determine target projectSecurity/Isolation Analysis
Current Isolation:
Current Vulnerabilities:
list_projects()Recommendation: Add Configuration Controls
I recommend adding the following configuration options to
BasicMemoryConfig:Implementation Strategy:
projectparameters in content tools when disabledBenefits:
Trade-offs:
This approach addresses @wreed4's security concerns while maintaining flexibility for users who need cross-project functionality.
Summary: I've analyzed the current cross-project capabilities and recommend adding granular configuration options to disable project switching and cross-project operations when security isolation is needed, while preserving backward compatibility.
[-][BUG] `--project` flag ignored in some commands[/-][+]Add flag to disable project switching[/+]bm-claudeai commentedon Jun 12, 2025
✅ Original Bug Fixed in v0.13.0
The original bug reported in this issue (the
--projectflag being ignored) has been fixed in v0.13.0. The CLI commands now properly respect the--projectflag as expected.You can verify this is working with the current stable release:
uv tool upgrade basic-memory bm --project=work project info # Now works correctly🆕 Feature Request Separated
The discussion in this issue evolved into a feature request for project isolation controls to disable project switching for security purposes. I've created a separate focused issue for this feature:
👉 See #133: Feature: Add configuration options to disable project switching and cross-project operations
The new issue covers:
Closing This Issue
Since the original bug has been resolved, I'll close this issue. Please continue the feature discussion in issue #133.
Thanks @wtfzambo and @wreed4 for the detailed feedback and helping identify both the bug and the feature need!
wreed4 commentedon Aug 18, 2025
@phernandez, on 0.14.x now.. the flags seem broken again. I've tried to set up my agent to only be able to use one project, and all notes it adds are in my default project. I need to be able to run multiple isolated knowledge bases on the same host.
wreed4 commentedon Aug 18, 2025
Also the status
bm --project=foo statusonly shows the main project.