fix(mcp): retry stale pipe transport failures

Treat closed-resource, closed-transport, broken-pipe, and EOF MCP failures as stale session equivalents so the existing reconnect/retry-once path can recover. Add regression coverage for the stale-pipe marker variants.\n\nChecks:\n- python -m py_compile tools/mcp_tool.py tests/tools/test_mcp_tool_session_expired.py\n- python -m pytest tests/tools/test_mcp_tool_session_expired.py -q -o addopts=\n- selected secret scan over touched files
This commit is contained in:
Alexander Monas 2026-05-05 00:58:34 +02:00 committed by Teknium
parent 8ad117a3d6
commit a1f85ef2b9
2 changed files with 17 additions and 0 deletions

View file

@ -1739,6 +1739,12 @@ _SESSION_EXPIRED_MARKERS: tuple = (
"session not found",
"unknown session",
"session terminated",
"closedresourceerror",
"closed resource",
"transport is closed",
"connection closed",
"broken pipe",
"end of file",
)