Skip to content

fix: conservatively retry legacy server initialization#1045

Draft
tsarlandie-oai wants to merge 1 commit into
modelcontextprotocol:mainfrom
tsarlandie-oai:codex/rmcp-1040-safe-legacy-lifecycle
Draft

fix: conservatively retry legacy server initialization#1045
tsarlandie-oai wants to merge 1 commit into
modelcontextprotocol:mainfrom
tsarlandie-oai:codex/rmcp-1040-safe-legacy-lifecycle

Conversation

@tsarlandie-oai

Copy link
Copy Markdown

Summary

  • retry legacy initialization for correlated method-not-found errors and known historical-only protocol signals
  • handle observed legacy HTTP 400 prevalidation responses and initial 404/405 responses
  • avoid fallback for unrelated IDs, arbitrary null-ID errors, contradictory or unknown versions, authentication failures, and existing-session 404 responses
  • preserve existing legacy initialization error handling

Why

Automatic legacy initialization needs to recognize genuine historical server behavior without turning unrelated protocol, authentication, or active-session failures into unsafe retries.

This narrows fallback to signals that reliably indicate a legacy endpoint and explicitly rejects ambiguous or contradictory cases.

Validation

  • comprehensive regression suite: 516 tests passed
  • whole-workspace formatting check passed
  • all-target, all-feature Clippy passed with the documented beta-only toolchain warning suppressed

Fixes #1040

@github-actions github-actions Bot added T-test Testing related changes T-core Core library changes T-service Service layer changes T-transport Transport layer changes labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-service Service layer changes T-test Testing related changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClientLifecycleMode::Auto does not fall back for deployed legacy-server responses

1 participant