Problem
Tool and task (subagent) execution has no timeout protection. If a tool call hangs — due to an unresponsive external service, a deadlocked shell command, or a stuck LLM provider — the session blocks indefinitely with no recovery path.
Tool execution
Non-task tools (bash, read, write, etc.) execute with no deadline. A stuck bash command that bypasses the shell hard-stop, or a hung MCP tool, will block the session forever.
Task execution
Subagent task tools have no top-level deadline. A child session that stalls — e.g., waiting on an unreachable provider, or caught in a retry loop — keeps the parent session blocked indefinitely with no structured error or recovery.
Expected behavior
- Non-task tools should have a configurable timeout (suggested default: 15 minutes)
- Task tools should have a configurable deadline (suggested default: 4 hours) with partial output recovery on timeout
- Timeouts should cancel the tool/task cleanly and return a structured error that the LLM can act on
- Configuration via
experimental.tool_timeout and experimental.task_timeout
Environment
Most visible in subagent-heavy workflows where child sessions make external API calls or run long shell commands.
Problem
Tool and task (subagent) execution has no timeout protection. If a tool call hangs — due to an unresponsive external service, a deadlocked shell command, or a stuck LLM provider — the session blocks indefinitely with no recovery path.
Tool execution
Non-task tools (bash, read, write, etc.) execute with no deadline. A stuck
bashcommand that bypasses the shell hard-stop, or a hung MCP tool, will block the session forever.Task execution
Subagent task tools have no top-level deadline. A child session that stalls — e.g., waiting on an unreachable provider, or caught in a retry loop — keeps the parent session blocked indefinitely with no structured error or recovery.
Expected behavior
experimental.tool_timeoutandexperimental.task_timeoutEnvironment
Most visible in subagent-heavy workflows where child sessions make external API calls or run long shell commands.