Make multi_agent_v2 wait_agent timeouts configurable#22528
Merged
andmis merged 2 commits intoMay 13, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
multi_agent_v2already allowed configuring the minimumwait_agenttimeout, but the default timeout and upper bound were still hard-coded. That made it hard to tune waits for subagent mailbox activity in sessions that need either faster wakeups or longer waits, and it meant the model-visiblewait_agentschema could not fully reflect the resolved runtime limits.What Changed
features.multi_agent_v2.max_wait_timeout_msandfeatures.multi_agent_v2.default_wait_timeout_msalongside the existingmin_wait_timeout_mssetting.0..=3_600_000, withmin_wait_timeout_ms <= default_wait_timeout_ms <= max_wait_timeout_ms.wait_agenttool schema.wait_agentnow uses the configured default whentimeout_msis omitted and rejects explicit values outside the configured min/max range instead of silently clamping them.