Timeout Handling
Timeouts prevent individual tool calls and entire agent runs from blocking indefinitely. Every tool call and every agent execution must have a time limit.
6 min•By Priygop Team•Updated 2026
Timeout Levels
- Tool call timeout: 10–30 seconds for a single API call. If exceeded, return a timeout error and retry.
- Agent step timeout: 60 seconds for a single agent reasoning + tool execution cycle
- Task timeout: the total time allowed for the entire agent run (e.g., 5 minutes)
- Waiting timeout: how long the agent waits for human approval before escalating (e.g., 24 hours)
- Always log which timeout was hit — this helps identify which step is slow
- On task timeout: return whatever partial result has been collected and escalate
Key Takeaways
- Timeouts prevent individual tool calls and entire agent runs from blocking indefinitely.
- Tool call timeout: 10–30 seconds for a single API call. If exceeded, return a timeout error and retry.
- Agent step timeout: 60 seconds for a single agent reasoning + tool execution cycle
- Task timeout: the total time allowed for the entire agent run (e.g., 5 minutes)