Skip to main content

DEFAULT_EXECUTOR_TIMEOUT

Constant DEFAULT_EXECUTOR_TIMEOUT 

Source
pub const DEFAULT_EXECUTOR_TIMEOUT: Duration;
Expand description

Default ceiling on a single executor run: one hour.

§Why bounded at all

This defaulted to None — unbounded — on the argument that any fixed value would fail legitimately long-running agent tasks. The argument is sound about short ceilings and wrong about the default: an executor that never returns pins its task, its event queue and its cancellation token for the life of the process, and nothing reclaims them. max_cancellation_tokens defaults to 10,000, so enough hung executors eventually stop the handler accepting work. Unbounded-by-default put the safe configuration behind an action nobody is reminded to take, and made the cost of forgetting a leak that is invisible until it is a outage.

§Why an hour

Long enough that it cannot plausibly interrupt real work: an interactive or streaming agent turn is seconds to minutes, and an hour is one to two orders of magnitude above that. An A2A task genuinely running longer should not be holding an executor and a stream open for it — that is what push notifications are for (§7).

Short enough that a hung executor is reclaimed the same day rather than never.

Set your own with with_executor_timeout, or opt out entirely with without_executor_timeout if your deployment really does have unbounded executors and accepts what that costs.