Skip to content

fix(mcp): list local and cloud projects when a project is unknown - #2054

Merged
phernandez merged 2 commits into
mainfrom
fix/1809-unknown-project-lists-local
Nov 4, 2026
Merged

phernandez merged 2 commits into
mainfrom
fix/1809-unknown-project-lists-local

Conversation

@phernandez

Copy link
Copy Markdown
Member

Fixes #1809.

When cloud credentials are present, a project name that isn't in local config goes to cloud discovery. If discovery misses too, the error listed only cloud projects:

Project 'no-such-project' was not found in indexed cloud workspaces. Available projects: personal/research, ...

None of the local projects appeared. Now:

Project 'no-such-project' not found. Local projects: main, research. Cloud projects: personal/research.
  • WorkspaceProjectLookupMiss now carries the cloud names it offered, in cloud_projects.
  • get_project_client catches the miss when the lookup started from local config. That means no config entry for the name, not hosted (factory) mode, and no explicit cloud routing. In that case it raises the combined message.
  • Hosted and explicit-cloud routes keep the existing cloud-only message, since they have no local projects.

This doesn't change the 0.7–1.2s cloud discovery call that #1809 mentions. Discovery is still needed, because a cloud project missing from local config must keep resolving.

Test: test_unknown_project_with_cloud_credentials_lists_local_and_cloud replaces only the cloud discovery call. It fails on main and passes here. just fast-check passes, and so do tests/mcp/test_project_context.py, test_unknown_project_routing.py and test_async_client_modes.py (120 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo

With cloud credentials present, a name missing from local config falls
through to cloud discovery. A miss there listed only cloud projects, so
a local user got a list without any of their local projects. When the
lookup started from local config (not a hosted or explicit cloud route),
the error now names both lists.

Fixes #1809

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo
Signed-off-by: phernandez <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T22:27:32.888033Z b4e410b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 423771a681

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/basic_memory/mcp/project_context.py Resolved
Comment thread src/basic_memory/mcp/project_context.py Resolved
Appending the local projects to the original miss keeps the qualified
workspace's project list and any discovery-failure note, which the
rewritten message dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo
Signed-off-by: phernandez <[email protected]>
@phernandez
phernandez merged commit 05480fc into main Nov 4, 2026
55 checks passed
@phernandez
phernandez deleted the fix/1809-unknown-project-lists-local branch November 4, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unknown-project error lists only cloud projects and omits local ones

1 participant