Skip to content

fix: forward originator to Codex Apps MCP - #31481

Merged
raquel-openai merged 9 commits into
mainfrom
codex/sites-desktop-originator
Jul 9, 2026
Merged

fix: forward originator to Codex Apps MCP#31481
raquel-openai merged 9 commits into
mainfrom
codex/sites-desktop-originator

Conversation

@raquel-openai

Copy link
Copy Markdown
Contributor

Summary

  • Forward Codexs canonical originator header on ChatGPT-hosted Apps and plugin-runtime MCP requests.
  • Preserve the configured X-OpenAI-Product-Sku header.
  • Cover originator-only and originator-plus-SKU configurations.

Why

Sites project creation is logged downstream of Apps MCP. Production validation found CODEX_UNKNOWN_DEFAULT project-created threads that matched codex_surface=desktop_app and originator=Codex Desktop in fact_codex_cli (query).

The hosted Apps MCP configuration forwarded the product SKU but not Codexs canonical originator, so codex-backend could not derive CODEX_DESKTOP_APP for those tool calls.

Validation

  • just fmt
  • CARGO_HOME=/private/tmp/codex-cargo-home CARGO_TARGET_DIR=/private/tmp/codex-target just test -p codex-mcp (106 passed)
  • CARGO_HOME=/private/tmp/codex-cargo-home CARGO_TARGET_DIR=/private/tmp/codex-target just fix -p codex-mcp

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@raquel-openai

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 7, 2026
Comment thread codex-rs/codex-mcp/src/mcp/mod.rs Outdated
@raquel-openai
raquel-openai marked this pull request as ready for review July 8, 2026 17:08
@raquel-openai
raquel-openai requested a review from a team as a code owner July 8, 2026 17:08

@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: 41f09ce711

ℹ️ 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/codex-mcp/src/mcp/mod.rs Outdated

@jif-oai jif-oai 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.

pre-approving

Comment thread codex-rs/core/src/mcp.rs Outdated
.config
self.runtime_config_with_context(
McpServerContributionContext::global(config),
/*originator*/ None,

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.

This still leaves connector discovery and the no-thread MCP paths without an originator
Is this wanted?

Comment thread codex-rs/ext/mcp/src/lib.rs Outdated
}

#[cfg(test)]
mod tests {

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.

move this to a test file please (see how it is done in the rest of the codebase)

@jif-oai jif-oai 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.

pre-approving

@raquel-openai
raquel-openai enabled auto-merge (squash) July 9, 2026 16:09
@raquel-openai
raquel-openai merged commit b58952b into main Jul 9, 2026
63 of 66 checks passed
@raquel-openai
raquel-openai deleted the codex/sites-desktop-originator branch July 9, 2026 16:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 9, 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.

2 participants