Session

When an MCP Tool Hangs, So Does Your Whole Agent

Your agent calls an MCP tool. The tool calls an API that is slow, or never answers, and the whole agent waits with it.

Start with a timeout on every tool call: a hang becomes a clear error the agent can handle. When a long-running tool takes longer than the caller will wait, split it: a start call returns a job id, and a check call reports done, failed or timed out. Learn what that split costs in tokens, and where MCP Tasks fits.


What you'll learn:
• A rule for each tool call: let it block, give it a timeout, or return a job id
• A tool timeout on MCP tools, so a hung API ends in an error instead of a stuck agent
• A start and check pair on an MCP server that the agent drives on its own
• End states and cleanup for jobs, so stalled ones do not pile up
• A way to keep status checks cheap in tokens
• What MCP Tasks covers, and how to check its support in your client and server

Outline:
• A slow API blocks the whole agent
• Add a tool timeout first
• When the work outlasts the caller, start a job and check it
• What the job pattern costs in tokens
• MCP Tasks and how to choose
• Resources and Q&A

Elizabeth Fuentes Leone

Developer Advocate

San Francisco, California, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top