Skip to content

Refuse a missing project_id when more than one project is visible, and reject an unknown workspace qualifier #2093

Closed

Description

@pharaoh1st

Observed behavior

On a shared local Basic Memory server with eight visible projects and a global default_project set:

  1. read_note(identifier="<title>") with project_id and project omitted did not refuse. It resolved through the server default/hierarchy and returned notes from a different project.
  2. read_note(project="bogus-workspace/homelab") did not refuse. The unknown workspace qualifier was ignored and the note from the homelab project was returned.
  3. read_note(project="<other-name>", project_id="<exact-homelab-uuid>") correctly returned the homelab note, so project_id precedence works.
  4. An invalid UUID and an invalid project name both returned Project not found: '<value>'. No wrong-project write was observed.

Expected behavior

The tool contract should fail closed for project selection:

  • If project_id is omitted and more than one project is visible, refuse with a readable error instead of resolving a default.
  • If a workspace qualifier is unknown, refuse once instead of silently ignoring it.
  • If a project name is ambiguous, refuse and name the exact IDs or ask for project_id.
  • A valid exact project_id continues to win.

Why it matters

This server is shared by multiple agents and projects. A caller that forgets project_id currently reads a different project without any error. That is a silent cross-project read, and it undermines a one-project-per-agent binding contract. A wrong-project write was not demonstrated, but the read path is not fail-closed.

Suggested change

Add a strict project-binding mode (ideally the default for a multi-project server) that enforces the rules above at the tool boundary, and return a stable typed error plus the candidate project IDs. A config switch is acceptable if the strict behavior is reachable without a code fork.

Repro notes

No secrets, customer content, or credentials are needed. The behavior reproduces with any two visible projects and an omitted project_id.

Activity

  1. added this to the nextup milestone on Nov 12, 2026
  2. phernandez commented on Nov 12, 2026

    @phernandez
    Member

    The missing-project half is fixed in 1.0: the bm_* tools require project. The unknown-workspace half needs Cloud, because only Cloud knows which workspace was routed. Tracked in https://github.com/basicmachines-co/basic-memory-cloud/issues/3124.

  3. phernandez commented on Nov 12, 2026

    @phernandez
    Member

    Closing. The missing-project half shipped in 1.0, and the unknown-workspace half is tracked in Cloud: https://github.com/basicmachines-co/basic-memory-cloud/issues/3124

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

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions