GeezerVison is showing github.com — fix(mcp): read event streams with mixed-case content types by Lucenx9 · Pull Request #19387 · pingdotgg/t3code
Conversation
Lucenx9
commented
Oct 14, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
An MCP response with Content-Type: Text/Event-Stream is read as one JSON document, producing Unexpected token 'd' for the SSE data: prefix. HTTP media type tokens are case-insensitive, so this is a valid spelling of text/event-stream. RFC 9110, section 8.3.1
Select SSE decoding by the trimmed, lowercased media type before its parameters. Preserve payload case and main's newer MCP cancellation/session coverage. Keep the shared reader and stdio-bridge regressions.
- contentType.includes("text/event-stream")
+ normalizedMediaType === "text/event-stream"
This is a very small, focused fix for an obvious protocol-decoding bug under CONTRIBUTING.md's exception. The production change is one comparison; both test additions cover that same dispatch defect. It changes no product defaults, contracts, dependencies or diagnostic suppressions.
All-state issue/PR searches and the related discussion found no duplicate. #14431 changes SSE line framing and leaves media-type dispatch unchanged. #17957 changes credentials in the same bridge but does not change this reader; #12025 changes the separate pairing probe.
Evidence
Integrated with main at 22dc1dabc6d3b1616d0fa5017268c086a77887bc, preserving its intentional test deletions. Verified on Debian 13 x86-64 with Node 24.15.0. The current project declares Node 26.12.1; CI validates its configured runtime.
- From
packages/shared/: ../../node_modules/.bin/vp test run --config ../../vite.config.ts src/mcpResponsePayloads.test.ts --maxWorkers=1: 6 passed.
- From
apps/server/: ../../node_modules/.bin/vp test run src/mcp/AcpMcpStdioBridge.test.ts --maxWorkers=1: 9 passed.
- From
packages/provider-acp/: ../../node_modules/.bin/vp test run --config ../../vite.config.ts src/server/mcpOverAcpBridge.test.ts --maxWorkers=1: 3 passed.
- Changed-file format/lint with one thread and scoped no-emit typecheck passed. No repo-wide checks were run. Effect emitted suggestions only in unchanged dependencies.
- Final independent standards and requirements reviews with GPT-6.1 Sol via Codex found no actionable issues.
Tests use real Response bodies and the public stdio bridge with its existing test harness. No live provider session, browser or external MCP server was exercised.
Merge danger
Door: two-way. This code-only change can be reverted.
Blast radius: MCP.
Implemented with GPT-6.1 Sol via the Codex harness in T3 Code; reviewed with Gemini 3.8 Flash High via the Antigravity harness.
Updated and reviewed with GPT-6.1 Sol via the Codex harness in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-14T11:16:03.418773Z |
5ed26c1 |
PR opened |
ℹ️ 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 5ed26c1
Macroscope's review found this PR approvable — The PR makes a one-line, standards-aligned media-type parsing fix and adds focused regression coverage. Runtime impact is limited to correctly routing mixed-case SSE responses and avoiding an existing false-positive dispatch, with no defaults, contracts, or sensitive areas changed.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 14, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
📥 Commits
-
Reviewing files that changed from the base of the PR and between 5ed26c1 and 2ee84ae.
📒 Files selected for processing: 2
-
apps/server/src/mcp/AcpMcpStdioBridge.test.ts
packages/shared/src/mcpResponsePayloads.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
📝 Walkthrough
-
The response parser now selects the SSE path only when the trimmed, lowercased media type before the first semicolon exactly matches text/event-stream. Tests cover SSE casing and charset variants, JSON content types, and bridge forwarding.
Changes: Response parsing
| Layer / File(s) |
Summary |
Content-type matching and validation packages/shared/src/mcpResponsePayloads.ts, packages/shared/src/mcpResponsePayloads.test.ts, apps/server/src/mcp/AcpMcpStdioBridge.test.ts |
The parser uses an exact normalized media-type match to select the SSE path. Tests cover casing and charset variants, JSON profile parameters, and forwarding a mixed-case SSE response through the bridge. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested labels: bugfix, size:M
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 2ee84
-
No actionable merge-blocking risk is identified in the reviewed change.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly and concisely describes the primary change: handling mixed-case content types for MCP event streams. |
| Description check |
 |
The description provides the problem, implementation details, scope rationale, issue review, verification commands and results, limitations, and review context. It uses different headings from the tem… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description provides the problem, implementation details, scope rationale, issue review, verification commands and results, limitations, and review context. It uses different headings from the template, but it covers the required information in substance.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|