Skip to content

fix: Retry MCP 408s on isolated session#2709

Merged
seratch merged 1 commit intomainfrom
dev/elainegan/mcp-408-isolated-retry
Mar 19, 2026
Merged

fix: Retry MCP 408s on isolated session#2709
seratch merged 1 commit intomainfrom
dev/elainegan/mcp-408-isolated-retry

Conversation

@elainegan-openai
Copy link
Copy Markdown
Contributor

Summary

  • treat MCP-wrapped request timeouts (McpError with code 408) as eligible for isolated-session retry
  • add a regression test covering the MCP 408 retry path

Validation

  • ruff check src/agents/mcp/server.py tests/mcp/test_client_session_retries.py
  • `PYTHONPATH=/Users/elainegan/code/openai-agents-python/src pytest -q tests/mcp/test_client_session_retries.py -k "mcp_408_on_isolated_session or retries_5xx_on_isolated_session or retries_cancelled_request_on_isolated_session or does_not_retry_4xx_on_isolated_session"

@github-actions github-actions bot added bug Something isn't working feature:mcp labels Mar 19, 2026
@elainegan-openai elainegan-openai changed the title [SEVBot] Retry MCP 408s on isolated session fix: Retry MCP 408s on isolated session Mar 19, 2026
@seratch seratch added this to the 0.12.x milestone Mar 19, 2026
@seratch seratch force-pushed the dev/elainegan/mcp-408-isolated-retry branch from 2e8e693 to 3f4d365 Compare March 19, 2026 05:39
@seratch seratch enabled auto-merge (squash) March 19, 2026 05:40
@seratch seratch merged commit 05dc068 into main Mar 19, 2026
9 checks passed
@seratch seratch deleted the dev/elainegan/mcp-408-isolated-retry branch March 19, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:mcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants