DEFAULT_MAX_PARALLEL_TOOLS

Constant DEFAULT_MAX_PARALLEL_TOOLS 

Source
pub const DEFAULT_MAX_PARALLEL_TOOLS: usize = 25;
Expand description

Default value for AgentConfig::max_parallel_tools.

Set to 25 to comfortably accommodate modern reasoning models (Qwen3-MoE, DeepSeek-R1, etc.) that routinely request 6–10 parallel tool calls per turn during exploration-heavy tasks (e.g. codebase reviews). An overflow is no longer fatal — the loop now soft-recovers by injecting a synthetic tool error and asking the model to retry with a smaller batch — but a generous default avoids triggering that recovery path under normal load.

Used both in AgentConfig::default and in super::events::AGENT_EVENT_CHANNEL_CAPACITY so the channel size accounts for the correct number of concurrent tool events.