narrow-chef-71655
10/29/2025, 9:19 AMtall-airline-16756
10/29/2025, 9:19 AMtall-airline-16756
10/29/2025, 9:20 AMclient_session_timeout_seconds and sse_read_timeout settings in your MCP server configuration to allow more time for your tool to complete its task.
• Prevent Interruptions: Consider using the disallow_interruptions() method in your tool’s code to make sure important operations aren’t cut off prematurely.
• Monitor Execution Time: It’s helpful to log how long your tools take to run, so you can set timeout values that really fit your needs.
• Review Tool Implementation: Double-check that your tools are set up to handle timeouts gracefully and return results exactly as expected.
If you’d like, I’m here to help you dive deeper into your configurations or walk you through some debugging steps. Just let me know!
Sources: Docs::Agents | mcp_client/util.py | livekit-agents/livekit/agents/voice/agent_activity.pynarrow-chef-71655
10/29/2025, 9:23 AMtall-airline-16756
10/29/2025, 9:24 AM@function_tool decorators, or are the tools being forwarded via RPC/MCP?
• Is this happening with all tools or just specific ones?
• Have you noticed any error messages or logs that might explain why the agent moves on too soon?
Getting these details will really help us get to the bottom of this and find the best solution for you.
Sources: Remote method calls | LiveKit docs | livekit-agents/livekit/agents/voice/generation.py | agents/src/voice/agent_activity.ts | Docs::Agentsnarrow-chef-71655
10/29/2025, 9:25 AMmcp.MCPServerHTTP(
url=url,
timeout=20,
client_session_timeout_seconds=20,
)tall-airline-16756
10/29/2025, 9:26 AMclient_session_timeout_seconds parameter controls the read timeout for the MCP server’s tool response stream. But if the agent isn’t waiting for the tool response, don’t worry — there are a few things we can check together to help resolve this:
• Verify URL Path: Please double-check that your MCP server URL ends with /mcp, as this enables the Streamable HTTP transport. If it ends with /sse, the sse_read_timeout parameter (which defaults to 5 minutes) might actually be taking priority over client_session_timeout_seconds.
• Set `sse_read_timeout`: If you’re using SSE transport, it’s a good idea to explicitly set sse_read_timeout to a value longer than your expected tool execution time to avoid premature timeouts.
• Check Logs and Events: Attaching event listeners like function_tools_executed and metrics_collected can be really helpful — they’ll show whether the tool is being called and if the response is coming through or getting interrupted.
• Test Transport Behavior: You might also want to try the LiveKit testing framework. It’s a great way to simulate tool calls and debug any timeout issues in a safe, controlled setting.
Could you please confirm the URL path you’re currently using and whether you’ve set the sse_read_timeout parameter? That info will really help us zero in on what might be going on. I’m here to help every step of the way!
Sources: tests/test_agent_session.py | Docs::Agents | Testing and evaluation | LiveKit Docs | Still Have Questions