Skip to content

feat: change resetTimeoutOnProgress default to true#1393

Closed
elango5292 wants to merge 1 commit intomodelcontextprotocol:mainfrom
elango5292:feat/default-reset-timeout-on-progress
Closed

feat: change resetTimeoutOnProgress default to true#1393
elango5292 wants to merge 1 commit intomodelcontextprotocol:mainfrom
elango5292:feat/default-reset-timeout-on-progress

Conversation

@elango5292
Copy link
Copy Markdown

@elango5292 elango5292 commented Jan 16, 2026

Summary

Changes the default value of resetTimeoutOnProgress from false to true.

Motivation

Long-running MCP tools (like AI research tools) can take 60+ seconds to complete. Servers can send progress notifications to indicate they're still working, but clients currently ignore these by default and timeout after 60 seconds.

This change makes progress notifications actually useful by default - if a server sends progress updates, the client will reset its timeout automatically.

Changes

  • packages/core/src/shared/protocol.ts: Changed default from false to true
  • Updated JSDoc to reflect new default

Backward Compatibility

Clients that explicitly set resetTimeoutOnProgress: false will continue to work as before. This only affects clients that don't specify the option.

Cross-SDK Consistency

I understand MCP has SDKs in multiple languages. If this change is accepted, should similar changes be made to other SDKs (Python, Java, etc.) for consistency? Happy to submit PRs to other SDKs if the team agrees this should be the default behavior across all implementations.

@elango5292 elango5292 requested a review from a team as a code owner January 16, 2026 10:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 16, 2026

⚠️ No Changeset found

Latest commit: 52ef6fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 16, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1393

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1393

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1393

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1393

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1393

commit: 52ef6fb

Long-running MCP tools that send progress notifications should
keep connections alive by default. This changes the default
behavior so clients automatically reset their timeout when
receiving progress updates.

Previously, clients would timeout after 60 seconds even if the
server was actively sending progress notifications, unless they
explicitly set resetTimeoutOnProgress: true.
@elango5292 elango5292 force-pushed the feat/default-reset-timeout-on-progress branch from 390c144 to 52ef6fb Compare January 16, 2026 10:49
@felixweinberger
Copy link
Copy Markdown
Contributor

Closing — resetTimeoutOnProgress is already settable per-request via the second argument to callTool (and every other client method):

await client.callTool({ name: "...", arguments: {...} }, { resetTimeoutOnProgress: true });

Changing the default is a behavioral break for every existing client, and it interacts with #1001 (a misbehaving server could hold requests open indefinitely by spamming progress). We'd want to think about both together — probably in a major version, with maxTotalTimeout as a required pair.

The real gap here is discoverability — this option isn't in the docs or examples. That's worth fixing. If you want to open a PR adding a long-running-tool example to examples/client/, happy to review that.

See #192 for the original discussion.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants