Fix generated MCP endpoint path - #486
Merged
Merged
Conversation
Owner
|
Thanks for the change! I’ll look into code later today. |
Owner
|
@Superbil LGTM! I'm ready to merge this. Let me know if there is anything else you plan to add, or we can put it to "Ready for review" and then I'll merge it. |
Superbil
marked this pull request as ready for review
August 19, 2026 06:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/mcpendpoint accepted by the HTTP serverRoot cause
#467 hardened the HTTP server around a bearer-authenticated, exact
/mcpendpoint. #465 later preserved launch argument boundaries, but also began passing the AI Code session ID to the URL builder. That generated/mcp/<session-id>, which the server rejects with HTTP 404 before authentication or MCP protocol dispatch.This change preserves the argument-boundary fix from #465 while restoring the endpoint contract established by #467. The bearer token still selects the registered agent session.
Codex version scope
This is not a regression introduced by Codex 0.147.0 or another recent Codex release. Codex's initial native Streamable HTTP support in 0.42.0 already consumed the configured URL verbatim, and current Codex does the same. The failing window begins in
ai-code-interface.elwith #465 (commit8f60b76), which changed the generated URL from/mcpto/mcp/<session-id>.Reference: Codex initial Streamable HTTP implementation
Relationship to existing work
/mcproute with bearer authentication.Verification
mainand passes with this patchcheck-parensandcheckdocpass for all modified filesgit diff --checkpasses