Skip to content

fix(harness): separate subagent wait tools from ordinary tool timeouts - #4278

Merged
xzxiaoshan merged 1 commit into
mainfrom
fix/subagent-managed-wait-timeouts
Nov 20, 2026
Merged

xzxiaoshan merged 1 commit into
mainfrom
fix/subagent-managed-wait-timeouts

Conversation

@jujn

@jujn jujn commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Mark task_output and wait_async_results as timeoutManaged.
  • Keep each tool's existing self-bounded wait budget authoritative, instead of allowing the ordinary tool execution timeout to interrupt the wait first.
  • Add focused regression coverage for a short Toolkit-level timeout that must not cut short a longer managed wait.
  • Update the English and Chinese subagent documentation.

Fixes #1451.

Background

task_output(block=true) accepts a wait timeout up to 600 seconds, while the default ordinary tool timeout is 5 minutes. As a result, a valid task_output wait could be interrupted by the outer ExecutionConfig.TOOL_DEFAULTS timeout before its own deadline.

agent_spawn and agent_send already use the existing timeoutManaged mechanism introduced by #3879. This change applies the same semantics to the two SubAgent result-waiting tools:

  • task_output(block=true) owns its bounded wait timeout.
  • wait_async_results owns its existing 60-second default / 120-second maximum wait budget.

wait_async_results is not affected by the default 5-minute ordinary timeout, but a shorter application-configured tool timeout can currently interrupt its own bounded wait. Marking it as timeout-managed makes the behavior consistent.

Behavior

  • task_output(block=true) continues to use its existing timeout parameter, default, and 600-second cap.
  • wait_async_results continues to use its existing timeout parameter, default, 120-second cap, and consecutive-empty-wait guardrails.
  • Non-blocking operations such as task_output(block=false), task_cancel, and task_list are unchanged.
  • Ordinary tools continue to use the normal ExecutionConfig timeout.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 13:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@xzxiaoshan
xzxiaoshan merged commit dbb7b5e into main Nov 20, 2026
8 checks passed
@jujn
jujn deleted the fix/subagent-managed-wait-timeouts branch November 27, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:HarnessAgent subagent task_output may be interrupted by default tool execution timeout

3 participants