fix: MCP proxy uses the repo space instead of activeSpace - #60
fix: MCP proxy uses the repo space instead of activeSpace#60MaheshtheDev wants to merge 2 commits into
Conversation
Hosted MCP defaults a missing containerTag to the user's durable activeSpace, so plugin search/save could miss the repo container the hooks already write to. Inject the repo tag on space-scoped tool calls unless one is already set, and advertise that search_memory defaults to this project.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3253e87847
ℹ️ 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".
| const apiKey = getApiKeyValue(); | ||
| let repoContainerTag: string | null = null; | ||
| try { | ||
| repoContainerTag = getProjectTag(process.cwd()); |
There was a problem hiding this comment.
Forward tag-selection variables to the MCP child
When Codex is started with SUPERMEMORY_ISOLATE_WORKTREES=true or SUPERMEMORY_REPO_TAG, this call cannot observe the setting because the installed MCP entry in src/cli.ts allow-lists only SUPERMEMORY_CODEX_API_KEY in env_vars. Codex's mcp add --help describes --env as the variables set when launching a stdio server, and with Codex 0.144.0-alpha.4 I confirmed an unlisted host variable is absent from the child. The hooks therefore write to the requested override/isolated container while MCP searches and saves use a different generated tag; add the tag-selection variables to the installed server's env_vars.
Useful? React with 👍 / 👎.
Same bug as claude-supermemory#124. Codex hooks already read and write the repo container, but
mcp-proxy.tswas a pass-through tomcp.supermemory.ai, which treats a missingcontainerTagas the user's durableactiveSpace.The proxy now injects
getProjectTag(cwd)on space-scopedtools/callrequests whencontainerTagis omitted. Explicit tags andwhoAmI/set-active-tagare left alone.Recall advertising is updated to match:
search_memorydefaults to this project's container. Codex exposes the tool asmcp__supermemory__search_memory(not Claude's three namespaces / ToolSearch), so this does not copy the Claude discovery prompt.