Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

Summary

Document the new client capabilities persistence feature in WorkerTransport from cloudflare/agents PR #783.

Changes

Updated /agents/model-context-protocol/mcp-handler-api/ documentation to reflect:

  • New initializeParams field in TransportState interface that stores client capabilities, clientInfo, and protocolVersion
  • Automatic persistence and restoration of client capabilities across serverless restarts
  • Backward compatibility with older stored state that lacks the initializeParams field

Context

The original PR (cloudflare/agents#783) fixed a critical bug where client capabilities were not persisted in serverless environments. This caused features like elicitation to fail after Durable Object/Agent hibernation.

The fix ensures that when using WorkerTransport with persistent storage, client capabilities are:

  1. Captured during initialization
  2. Stored alongside session state
  3. Automatically restored by replaying the initialize request after restart

This documentation update makes developers aware of this behavior and the new fields in TransportState.

Related PR

@github-actions github-actions bot added product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/s labels Jan 15, 2026
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

Update documentation to reflect PR cloudflare/agents#783 changes:

- Updated TransportState interface to include initializeParams field
- Added documentation explaining that client capabilities, client info,
  and protocol version are now persisted and restored across serverless restarts
- Emphasized importance of capability persistence for elicitation and sampling features
- Added detailed field descriptions for TransportState interface

This enables MCP servers to properly support advanced client features like
elicitation after serverless cold starts.

Related: cloudflare/agents#783

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates documentation to reflect that WorkerTransport now persists
client capabilities across serverless restarts. This fixes an issue
where elicitation and other capability-dependent features would fail
after hibernation or cold starts.

Changes:
- Add initializeParams to TransportState interface documentation
- Document that client capabilities are persisted and restored
- Clarify the behavior of state restoration

Related to cloudflare/agents#783

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants