Skip to content

stdio transport: a request over the maximum line length gets no answer #1395

Open

Description

@jordiboehme

Since #1049 (rmcp 3.6.0) AsyncRwTransport drops a line that is longer than the maximum line length (16 MiB by default). It only writes a log entry. When that line is a request, the peer never gets an answer and waits until its own timeout. From the client side this looks like a server that hangs.

I found this while writing an MCP server that takes large inline files. A tools/call with a large base64 file in the arguments is enough.

To reproduce:

  1. Start any stdio server built on rmcp 3.7.0.
  2. Send initialize and notifications/initialized.
  3. Send one tools/call request whose line is larger than 16 MiB, for example with a 17 MiB string in arguments.
  4. The server logs "Incoming message exceeded the maximum line length, discarding it". The client gets nothing for this id.

Expected: an error answer for the request id, like the -32600 Invalid Request answer rmcp already sends for valid JSON with the wrong shape.

Lines without an id, responses and input that is not JSON should stay unanswered, so this does not bring back the error storm from #938.

I have a fix ready that builds on #1370. I can open it after that PR is merged.

Activity

  1. added
    bugSomething is not working
    P1High: significant functionality gap or spec violation
    T-transportTransport layer changes
    ready for workIssue is well-defined and ready to be picked up
    on Oct 26, 2026
  2. github-actions commented on Oct 26, 2026

    @github-actions
    Contributor

    @gocamille is on triage rotation this week and is the reviewer for this one.

    Codex labeled this bug / P1 (T-transport). Please confirm or correct those labels.

    Automated triage. Labels are a first pass and the assigned maintainer has the final say.

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

Metadata

Metadata

Assignees

Labels

P1High: significant functionality gap or spec violationT-transportTransport layer changesbugSomething is not workingready for workIssue is well-defined and ready to be picked up

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions