Skip to content

[FEATURE]: Add configurable timeout parameter to the Task tool #15080

@jdocker8

Description

@jdocker8

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The Task tool (used to dispatch subagents like explore and general) has no timeout parameter. Subagents can hang for 5–15+ minutes on tasks that should complete in 15–30 seconds, blocking the entire conversation with no way for the caller to recover programmatically.

The Bash tool already supports an optional timeout parameter (in milliseconds). The Task tool should have the same capability.

Proposed changes:

  1. Add an optional timeout parameter to the Task tool schema (milliseconds, consistent with Bash tool).
  2. Set a reasonable default timeout (e.g., 120,000 ms / 2 minutes) when none is specified.
  3. On timeout, return a structured timeout error so the calling agent can fall back — retry with a smaller scope, do the work directly, or inform the user.

Why this matters:

  • There is currently no workaround. The caller agent waits indefinitely and the user must manually abort.
  • Codebases with AI rules (e.g., "set explicit timeout per request," "never wait indefinitely") cannot enforce those rules on Task tool calls because the parameter doesn't exist.
  • This is distinct from the async/non-blocking dispatch request in Feature Request: Async Task Management - Non-blocking Subagent Dispatch #15069. That issue proposes a fundamentally different execution model. This request is narrower: just add a timeout so synchronous Task calls don't hang forever.

Note: Supersedes #15072, which was not created using the required feature request template.

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions