Repository navigation
Description
Description
Wayflow MCP execution does not complete when the configured MCP server fails to respond. After waiting approximately 60 seconds, the MCP request times out. During timeout handling, a secondary exception is raised:
AttributeError: 'str' object has no attribute 'message'
The failure is observed in the MCP execution tests, including:
tests/mcp/execution/test_valid_configs_agent_with_mcptool.pytests/mcp/execution/test_valid_configs_agent_with_mcptoolbox.pytests/mcp/execution/test_valid_configs_flow_with_mcptool.py
The CTS logs show that the MCP request waits for a ClientRequest response and eventually fails with a timeout. In at least one path, the MCP exception construction or propagation then attempts to access .message on a string, masking the original timeout.
The Wayflow CTS runtime currently delegates execution directly to:
self.conversation.execute()in wayflowruntime/runtime.py:69-75. The runtime only translates normal Wayflow execution statuses in _transform_wayflow_execution_status_to_agentspec() and does not normalize MCP timeout or connection exceptions.
The loader enables unauthenticated MCP mode through:
enable_mcp_without_auth()but there is no corresponding validation that the MCP endpoint is reachable before execution begins.
Expected behavior
When the MCP server is unavailable or does not respond within the configured timeout, the runtime should:
- Preserve the original timeout or connection exception.
- Return a clear MCP-specific failure.
- Include the MCP endpoint and timeout duration where available.
- Avoid raising a secondary
AttributeError. - Avoid converting an infrastructure failure into an unrelated runtime failure.
If the MCP server is available, the tests should complete and return the expected user/session or flow output.
Relevant code
agent-spec/conformance_test_suite/runtimes/wayflowruntime/src/wayflowruntime/runtime.py:69-75agent-spec/conformance_test_suite/runtimes/wayflowruntime/src/wayflowruntime/runtime.py:118-135agent-spec/conformance_test_suite/runtimes/wayflowruntime/src/wayflowruntime/runtime.py:154-172agent-spec/conformance_test_suite/tests/mcp/execution/test_valid_configs_agent_with_mcptool.pyagent-spec/conformance_test_suite/tests/mcp/execution/test_valid_configs_agent_with_mcptoolbox.pyagent-spec/conformance_test_suite/tests/mcp/execution/test_valid_configs_flow_with_mcptool.py
Activity
fix(mcp): report server timeouts clearly and honor Agent Spec read ti…