Skip to content

[Bug]: Codex 0.160 agents get no T3 Code MCP tools: /mcp answers server/discover with HTTP 400 #16067

Description

@SiavZ

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Install Codex CLI 0.160.0.
  2. Run t3 serve on current main. Seen on 37de6cbde; apps/server/src/mcp/McpHttpServer.ts is unchanged on 1a3f7ad50.
  3. Start a Codex thread and ask the agent to call any t3-code tool, for example orchestrator_capabilities.

Expected behavior

Codex connects to the t3-code MCP server and the agent can call T3 Code's tools.

Actual behavior

Codex marks t3-code as failed at session start, so the agent has none of T3 Code's tools. The provider event log shows:

mcpServer/startupStatus/updated  name: t3-code  status: failed
MCP client for `t3-code` failed to start: MCP startup failed: handshaking with MCP server failed:
... error: unexpected server response: HTTP 400: , when send discover request

The server trace shows three POST /mcp requests from codex-mcp-client/0.160.0 with mcp-method: server/discover and mcp-protocol-version: 2026-07-28, each answered with status 400. Bearer authentication passes (McpSessionRegistry.resolve succeeds), so the request is rejected during protocol negotiation, not auth.

Likely cause: McpHttpServer.ts pins protocols: [McpProtocol.v2025_06_18]. The bundled Effect (4.0.0-rc.115) ships protocol adapters up to v2025_11_25, and McpServer.ts carries a TODO about session strategy "before v2026-07-28".

A Claude thread in the same build connects and calls the tools normally.

Impact

Major degradation or frequent failure

Version or commit

37de6cbde (the same pin is on main 1a3f7ad50)

Environment

macOS, Node 24, Codex CLI 0.160.0 (ChatGPT sign-in), server started with t3 serve

Logs or stack traces

See "Actual behavior". Server trace span: http.server POST /mcp, http.request.header.mcp-method: server/discover, http.request.header.mcp-protocol-version: 2026-07-28, http.response.status_code: 400.

Workaround

None found. Claude threads are unaffected.

Found by Claude Opus 5.5 in Jcode while running headless acceptance tests on an isolated base dir.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions