You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Task tool needs configurable timeout to prevent indefinite hangs #15072
When using the Task tool to launch subagents (explore, general), there is no way to set a timeout. Subagents frequently hang for 5-15+ minutes on tasks that should take 15-30 seconds, blocking the entire conversation.
Context
The host repo has AI rules (AI_RULES.md §16) that explicitly require:
"Set explicit timeout per request: 2 min (simple), 5 min (larger)"
"On timeout: cancel, then re-issue with smaller scope or do it directly"
"Never wait indefinitely"
But the Task tool schema has no timeout parameter, so these rules are unenforceable. The Bash tool has a timeout parameter — Task should too.
Expected behavior
Task tool should accept an optional timeout parameter (milliseconds, like Bash tool)
Reasonable default timeout (e.g., 120s) if none specified
On timeout: return a timeout error so the caller can fall back to doing the work directly
Current workaround
None. The caller agent just waits indefinitely, and the user has to manually abort.
This appears to be a feature request, but it does not use the required Feature Request template. Please resubmit using the correct template, which requires a verification checkbox and description, and the title should start with [FEATURE]:.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
In my session, I launched an explore subagent to audit diagnostic step conditions across 5 workflow files. The agent hung for over 5 minutes before the user manually aborted it.
After aborting, I ran the exact same work directly using 5 parallel grep calls. It completed in ~2 seconds and I was immediately ready to move on.
...across 5 YAML files. Trivially parallelizable, no complex reasoning needed.
Why a timeout is critical
Without a timeout parameter on the Task tool:
The caller agent has no way to set a deadline
The user has to manually notice the hang and abort
Simple 2-second tasks can block the conversation for 5-15+ minutes
The caller can't implement the fallback pattern ("on timeout, do it directly") because it never gets control back
A timeout parameter (like the Bash tool already has) would let the caller set e.g. timeout: 30000 (30s) for simple searches, get a timeout error, and immediately fall back to doing the work directly.
Activity
github-actions commentedon Feb 25, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
jdocker8 commentedon Feb 25, 2026
Real-world example of the problem
In my session, I launched an
exploresubagent to audit diagnostic step conditions across 5 workflow files. The agent hung for over 5 minutes before the user manually aborted it.After aborting, I ran the exact same work directly using 5 parallel
grepcalls. It completed in ~2 seconds and I was immediately ready to move on.The work was:
...across 5 YAML files. Trivially parallelizable, no complex reasoning needed.
Why a timeout is critical
Without a timeout parameter on the Task tool:
A
timeoutparameter (like the Bash tool already has) would let the caller set e.g.timeout: 30000(30s) for simple searches, get a timeout error, and immediately fall back to doing the work directly.jdocker8 commentedon Feb 25, 2026
Closing in favor of #15080, which was recreated using the required feature request template.