`opencode` calling search_graph returns "project not found" but list_projects shows available projects
Version
0.9.0
Platform
Windows (x64)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
standard
What happened, and what did you expect?
When using opencode to call the search_graph tool from codebase-memory-mcp, an error is returned indicating that the project is not found or not indexed. However, list_projects correctly shows the list of indexed projects. This suggests a mismatch between the project parameter passed and the actual indexed project names, or a difference in how the tool resolves project names.
Reproduction
Environment:
opencode version: 1.17.18 codebase-memory-mcp version: 0.9.0 OS: Windows 11 Node.js version: 24.15.0 opencode installed via: npm
Call codebase-memory-mcp_search_graph with parameters like:
{
"project": "codebase-memory-mcp",
"query": "sync",
"label": "function"
}
Receive the following error response:
{
"error": "project not found or not indexed",
"hint": "Use list_projects to see all indexed projects, then pass it as the "project" argument.",
"available_projects": [
"E-project-graph-codebase-memory-mcp",
"E-project-graph-codegraph",
"E-project-ruoyi-vue-pro"
],
"count": 3
}
Logs
Diagnostics trajectory (memory / performance / leak issues)
Project scale (if relevant)
No response
Confirmations
- [x] I searched existing issues and this is not a duplicate.
- [x] My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
The same problem occurs, and it gets stuck for a long time.I noticed a pattern: this error doesn’t happen immediately, it only shows up after running the Claude code for a while.
Fixed on main by 2432cc8 (merged in 71cd27f, PR #1054), shipping in v0.9.1.
Your diagnosis was exactly right — the indexed project names derive from the full path (E:\project\graph\codebase-memory-mcp → E-project-graph-codebase-memory-mcp), which no MCP client can guess. All project-taking tools now resolve a passed name that matches exactly one indexed project as a segment-aligned tail: {"project":"codebase-memory-mcp"} finds E-project-graph-codebase-memory-mcp automatically (logged as mcp.project_tail_resolved). If several projects share the tail, the not-found error with the candidate list still fires so nothing is guessed.
The "gets stuck for a long time" observation from the second commenter looks like a separate problem — if that persists on v0.9.1, please open a dedicated issue with the diagnostics trajectory so it gets its own investigation rather than riding on this closed one.