Skip to content

Limit how long a gateway tool call can run #2836

Open

Description

@ChrisJBurns

Related: #2536, #2564, #2730, #2731

Problem

A gateway tool call has no time limit on Mecatl's side. A gateway that keeps streaming, or never answers, holds the call open until the run is cancelled, and the call's send-once claim stays held the whole time. This is safe (the call is never sent twice), but a stuck call blocks the run until someone cancels it. The MCP client's ordinary path for MCP servers has the same gap.

Design

What

  • A maximum duration for a gateway tool call on the client side, no shorter than the vMCP's. Decide whether it is fixed or an operator setting.
  • A call that reaches it ends as an unknown outcome, if the request was written, and keeps its send-once claim.
  • A bound on how much of a response the client reads.
  • Decide whether the same limit applies to calls to ordinary MCP servers.

Done when

A gateway that never answers, or streams without end, ends the call at the limit as an unknown outcome, and the call is not sent again.

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