Skip to content

Transparent proxy: session-not-found 404 does not echo the request JSON-RPC id #5945

Closed

Description

@jhrozek

Summary

The transparent proxy's unknown-session guard returns a JSON-RPC -32001 (session not found) 404 whose body does not echo the incoming request's JSON-RPC id. session.NotFoundResponse builds the body via NotFoundBody(nil) (id hardcoded to null), whereas the classification-error path (mcp.ClassificationErrorResponse) does echo the request id. This is a minor consistency/asymmetry nit: a client correlating responses by id gets null for this one error class.

Where

  • pkg/transport/session — NotFoundResponse / NotFoundBody(nil)
  • Emitted from the transparent proxy's unknown-session guard in pkg/transport/proxy/transparent/transparent_proxy.go (RoundTrip).

Suggested fix

Thread the parsed request id through to NotFoundBody (as the classification path already does) so the 404 echoes the id.

Context

Found while writing dual-era stateless proxy e2e tests (#5837). The 404 behavior itself is correct-by-design (deliberate fail-safe: the session guard keys on Mcp-Session-Id presence, not the client-forgeable revision) — this issue is only about echoing the id for symmetry. Low priority.

Activity

  1. added
    needs-triage
    on Jul 23, 2026
  2. removed
    needs-triage
    on Jul 27, 2026
  3. self-assigned this
    on Jul 27, 2026
  4. added 3 commits that reference this issue on Jul 27, 2026
    1bd0d48
    abd7af2
    15e0852
  5. added a commit that references this issue on Jul 27, 2026
    cb1f9d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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