Skip to content

docs(core): clarify resetTimeoutOnProgress requires onprogress#2082

Open
Jefsky wants to merge 3 commits into
modelcontextprotocol:mainfrom
Jefsky:fix/resetTimeoutOnProgress-docs
Open

docs(core): clarify resetTimeoutOnProgress requires onprogress#2082
Jefsky wants to merge 3 commits into
modelcontextprotocol:mainfrom
Jefsky:fix/resetTimeoutOnProgress-docs

Conversation

@Jefsky
Copy link
Copy Markdown

@Jefsky Jefsky commented May 13, 2026

Summary

The resetTimeoutOnProgress option only works when a progress token is included in the request, which requires onprogress to be set. Without onprogress, no token is sent so the server never sends progress notifications and the timeout reset never triggers.

This documents the behavior clearly so users don't expect it to work when progress is consumed via lower-level transport features without onprogress being set.

What changed

packages/core/src/shared/protocol.ts — updated JSDoc for resetTimeoutOnProgress to explain:

  • Progress token is only included when onprogress is explicitly provided
  • resetTimeoutOnProgress only takes effect when onprogress is also set
  • If progress is consumed via lower-level transport features, provide a no-op onprogress callback to enable timeout reset on progress

This is a documentation-only fix. The suggested workaround (providing a no-op onprogress) is the correct approach for users who want to use resetTimeoutOnProgress with transport-level progress consumption.

Closes #2076

Jefsky Agent added 3 commits May 13, 2026 23:21
registerPrompt() was destructuring only { title, description, argsSchema, _meta }
from the config, silently dropping icons. The MCP 2025-11-25 spec explicitly
allows icons on PromptDefinition, and the Icon interface already exists.

This change:
- Adds icons?: Icon[] to all three registerPrompt() overloads
- Passes icons through _createRegisteredPrompt()
- Stores icons on RegisteredPrompt
- Includes icons in the prompts/list response
- Adds icons to the update() method

Closes modelcontextprotocol#2054
refreshAuthorization() + saveTokens() were wrapped in a single try/catch.
If saveTokens() threw an I/O error (filesystem, file lock, etc.), it was
silently discarded by the same catch block that handled AS-side failures.

Separating the two:
- refreshAuthorization failure → fall through to re-auth (as before)
- saveTokens failure → propagates naturally so caller can handle it

Also adds a comment clarifying the I/O error case should propagate.

Fixes modelcontextprotocol#2034
The resetTimeoutOnProgress option only works when a progress token is
included in the request, which requires onprogress to be set. Without
onprogress, no token is sent so the server never sends progress
notifications and the timeout reset never triggers.

Documents the behavior clearly so users don't expect it to work when
progress is consumed via lower-level transport features without
onprogress being set.

Fixes modelcontextprotocol#2076
@Jefsky Jefsky requested a review from a team as a code owner May 13, 2026 15:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

⚠️ No Changeset found

Latest commit: 27c6891

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 May 13, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2082

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2082

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2082

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2082

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2082

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2082

commit: 27c6891

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.

resetTimeoutOnProgress on low-level request() only works when onprogress is explicitly provided

1 participant