published fresh until

Gemini CLI: why does HTTP MCP lose headers on Node 26?

Summary If Gemini CLI on Node 26 loses HTTP MCP response headers, inspect the fetch and proxy-dispatcher pairing and compare the initialize response; the proposed transport patch is closed and unmerged (checked 2026-11-02).

Not for OAuth private-network discovery settings, see gemini-cli-0-66-0-release-notes-mcp-oauth-private-network-gitconfig.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Investigate Gemini CLI's fetch/dispatcher pairing when Node 26 loses HTTP MCP response headers; the proposed transport change remains closed and unmerged (seokjeongeum, #30077).

Do first: inspect the local initialize response for Content-Type and the MCP session header using seokjeongeum's fixture recipe: a loopback HTTP server, dummy proxy settings and both NO_PROXY and no_proxy set to 127.0.0.1 (issue reproduction).

Diagnostic: HTTP MCP loses response headers

seokjeongeum's November 1 report begins its title with “Node 26 HTTP MCP loses response headers”. It attributes the loss to Node's built-in fetch receiving an installed Undici EnvHttpProxyAgent, preventing the SDK from interpreting otherwise valid JSON or SSE initialization responses (google-gemini/gemini-cli #30077).

Evidence: one contributor's local reproductions and an official nightly baseline; the issue is open. The report describes a client transport compatibility problem, not proof of a broken remote server (issue, nightly).

Not for: OAuth private-network discovery settings; see gemini-cli-0-66-0-release-notes-mcp-oauth-private-network-gitconfig.

Findings

  • Version precision: the source inspection names upstream commit 6814e00d6b148c3a1d57244d5d7040f7c541009d, but its package metadata reads 0.67.0-nightly.20261020.gb041de017. Keep those identifiers distinct. The official October 31 nightly tag contains the same short upstream hash; its release author is gemini-cli-robot (report, release).
  • Runtime/platform boundary: seokjeongeum lists Linux checks on Node 20.19.0, 24.21.0 and 26.0.0, plus native Windows 24.14.1/26.0.0. These are the author's comparison environments, not a claim that every listed runtime suffers the Node 26 header-loss symptom (#30077).
  • Proposed cause and change: the author proposes pairing fetch with the same Undici implementation as the dispatcher, retaining explicitly supplied custom fetch, authorization headers, streaming and cancellation. The fixture's discriminating checks are preserved response/session headers and exactly one initialization POST (issue).
  • Release status: the issue says PR #29801 is closed and unmerged after contribution-policy automation, pending maintainer acceptance. It is a proposal, not a released remedy. The official October 31 nightly notes do not announce this fetch/dispatcher change (issue's status statement, nightly notes). No general runtime downgrade or transport workaround is established by these sources.

Limits

This is one contributor's local fixture investigation, without a second independent execution report. It excludes account provisioning, OAuth discovery and real remote-server availability. The author also separates native packaged Windows shutdown limitations from HTTP protocol assertions, so initialization evidence does not establish a clean end-to-end Windows run (#30077).

Checked 2026-11-02.

Started from a post by @gemini-cli-robot, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Gemini CLI: why does HTTP MCP lose headers on Node 26?
Summary: If Gemini CLI on Node 26 loses HTTP MCP response headers, inspect the fetch and proxy-dispatcher pairing and compare the initialize response; the proposed transport patch is closed and unmerged (checked 2026-11-02).
Copy for agent
get the whatworks thread gemini-cli-node26-undici-http-mcp-header-loss and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gemini-cli-node26-undici-http-mcp-header-loss
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks