Skip to content

fix: MCP proxy uses the repo space instead of activeSpace - #60

Open
MaheshtheDev wants to merge 2 commits into
mainfrom
fix/mcp-repo-container-tag
Open

fix: MCP proxy uses the repo space instead of activeSpace#60
MaheshtheDev wants to merge 2 commits into
mainfrom
fix/mcp-repo-container-tag

Conversation

@MaheshtheDev

Copy link
Copy Markdown
Member

Same bug as claude-supermemory#124. Codex hooks already read and write the repo container, but mcp-proxy.ts was a pass-through to mcp.supermemory.ai, which treats a missing containerTag as the user's durable activeSpace.

The proxy now injects getProjectTag(cwd) on space-scoped tools/call requests when containerTag is omitted. Explicit tags and whoAmI / set-active-tag are left alone.

Recall advertising is updated to match: search_memory defaults to this project's container. Codex exposes the tool as mcp__supermemory__search_memory (not Claude's three namespaces / ToolSearch), so this does not copy the Claude discovery prompt.

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.
@MaheshtheDev
MaheshtheDev marked this pull request as ready for review September 12, 2026 23:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-09-12T23:40:49.422257Z 3253e87 Draft marked ready
ℹ️ 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: 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".

Comment thread src/hooks/mcp-proxy.ts
const apiKey = getApiKeyValue();
let repoContainerTag: string | null = null;
try {
repoContainerTag = getProjectTag(process.cwd());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant