Skip to content

Make MCP server contributions thread-scoped#27670

Merged
jif-oai merged 2 commits into
mainfrom
jif/mcp-thread-scoped-registration-context
Jun 12, 2026
Merged

Make MCP server contributions thread-scoped#27670
jif-oai merged 2 commits into
mainfrom
jif/mcp-thread-scoped-registration-context

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Why

selectedCapabilityRoots belongs to one thread, but MCP contributors previously received only the global Codex config. That left no clean way for a selected executor capability to contribute MCP servers to its own thread.

What this PR does

  • Gives MCP contributors a small context containing the config and, for a running thread, its frozen host-seeded inputs.
  • Uses the same thread inputs during startup, status queries, refreshes, and skill dependency checks.
  • Keeps threadless MCP operations and the existing hosted Apps behavior unchanged.
  • Adds coverage showing that two threads resolve independent registrations and that later lifecycle mutations do not change the frozen MCP inputs.

This PR does not discover plugin manifests, add MCP servers, or launch anything new. It only establishes the thread-scoped registration boundary.

Follow-ups

  • Resolve selected executor plugin roots through their owning environment filesystem.
  • Convert their stdio MCP declarations into environment-bound registrations and add an executor MCP end-to-end test.

Verification

  • just fmt
  • cargo check --tests -p codex-protocol -p codex-extension-api -p codex-mcp-extension -p codex-core -p codex-app-server

Tests and Clippy were not run.

@jif-oai jif-oai changed the title [codex] Make MCP server contributions thread-scoped Make MCP server contributions thread-scoped Jun 11, 2026
@jif-oai jif-oai marked this pull request as ready for review June 11, 2026 20:52
@jif-oai jif-oai requested a review from a team as a code owner June 11, 2026 20:52
@jif-oai

jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: f8256a5751

ℹ️ 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 codex-rs/core/src/thread_manager_tests.rs
Comment thread codex-rs/app-server/src/request_processors/mcp_processor.rs
@jif-oai jif-oai merged commit 693082f into main Jun 12, 2026
31 checks passed
@jif-oai jif-oai deleted the jif/mcp-thread-scoped-registration-context branch June 12, 2026 09:20
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant