Session
When an MCP Tool Hangs, So Does Your Whole Agent
Your agent calls a tool, the tool calls a slow external service, and it takes 30 seconds or never answers. The agent waits, then dies with a cryptic error. One slow dependency took down the whole run. The fix is an async call: if a tool can be slow, do not wait on it. One tool starts the work and hands back a tracking id right away, another checks if it is done. The agent stays responsive and polls for the result. That turns a 300 second hang into about a 4 second response, and timeouts and cleanup keep stalled jobs from piling up.
What you'll learn: • Apply a simple rule to classify any tool call as safe to block or required to go asynchronous • Build the async handle pattern: one tool returns a tracking id instantly, another polls for the result • Design job lifecycle and cleanup so completed and stalled jobs do not leak memory • Implement clear error and timeout states so failed dependencies surface instead of hanging • Evaluate polling against callback delivery and choose per use case Outline: • One slow dependency, whole workflow down • The pattern is older than agents • Build the async boundary • Make it production safe • The decision checklist
Elizabeth Fuentes Leone
Developer Advocate
San Francisco, California, United States
Links
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