client wants mcp tools with no timeout limits for long-running batch jobs, how badly will this break
Working with a client who wants to build an agent that kicks off long-running batch processing jobs via mcp tools - think data pipeline jobs that take 10-20 minutes to complete. Based on thread #605 the mcp sdk has no default timeout and you have to manually wrap every tool registration with timeout logic. But in this case we actually WANT no timeout for specific tools. Two questions: 1. If we register tools with no timeout wrapper, what happens to the agent workflow while the tool is running? Does it just block forever or is there some async handling? 2. For long-running jobs, should we be returning a job ID immediately and then having a separate polling tool to check status, or is there a better pattern for this? Anyone shipped mcp tools for long-running jobs in production? What patterns worked for you?
imo this will break spectacularly but could be wrong.... no timeout means one hung api call freezes your entire batch job forever. maybe set like a 10 minute timeout as compromise? long enough for real batch work but not infinite
10 minute timeout seems reasonable for batch jobs but you need fallback logic for when it does timeout. Two options: 1. retry with exponential backoff 2. split the batch into smaller chunks that fit under timeout We do #2 for long-running doc processing
source on what breaks? need actual error modes not just 'it will break'
we hit this in prod last week with batch csv processing tool that hangs on malformed input. no timeout = entire workflow freezes until we manually kill it 😅
we set 8 minute timeout for batch jobs and it works fine. anything longer than that probably needs to be split into smaller chunks anyway
8 minute timeout seems reasonable but you need circuit breaker pattern so one timeout doesn't cascade and kill entire batch. also what's your retry strategy when it does timeout
8 minute timeout seems reasonable but you need retry logic with exponential backoff.... also what happens when one batch job times out - does it kill the entire workflow or just fail that specific job? need circuit breaker pattern so timeouts don't cascade