Skip to content

The agent that grows with you

test(mcp): stdio arm of the transport-rebuild test now expects no replay

teknium19678d59c2365
diff --git a/tests/tools/test_mcp_tool_session_expired.py b/tests/tools/test_mcp_tool_session_expired.py
index f103959ae76..046cec0f8c1 100644
--- a/tests/tools/test_mcp_tool_session_expired.py
+++ b/tests/tools/test_mcp_tool_session_expired.py
@@ -196,8 +196,14 @@ def test_call_tool_handler_rebuilds_configured_server_transport(
handler = _make_tool_handler("resumed", "health", 10.0)
parsed = json.loads(handler({}))
- assert parsed == {"result": "reconnected"}
- assert call_count["n"] == 2
+ if expected_route == "stdio":
+ # A stdio pipe closing after dispatch is an ambiguous mid-call death: the transport
+ # is rebuilt for future calls, but the call itself is not replayed (#106440).
+ assert parsed["outcome_uncertain"] is True, parsed
+ assert call_count["n"] == 1
+ else:
+ assert parsed == {"result": "reconnected"}
+ assert call_count["n"] == 2
assert routes == [expected_route, expected_route]
assert configs == [transport_config, transport_config]
assert len(sessions) == 2