Skip to content

Make multi_agent_v2 wait_agent timeouts configurable#22528

Merged
andmis merged 2 commits into
mainfrom
andrey/allow-configurable-default-and-max-wait-times
May 13, 2026
Merged

Make multi_agent_v2 wait_agent timeouts configurable#22528
andmis merged 2 commits into
mainfrom
andrey/allow-configurable-default-and-max-wait-times

Conversation

@andmis
Copy link
Copy Markdown
Collaborator

@andmis andmis commented May 13, 2026

Why

multi_agent_v2 already allowed configuring the minimum wait_agent timeout, 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-visible wait_agent schema could not fully reflect the resolved runtime limits.

What Changed

  • Added features.multi_agent_v2.max_wait_timeout_ms and features.multi_agent_v2.default_wait_timeout_ms alongside the existing min_wait_timeout_ms setting.
  • Validated all three timeouts in config as 0..=3_600_000, with min_wait_timeout_ms <= default_wait_timeout_ms <= max_wait_timeout_ms.
  • Thread and review session tool config now passes the resolved min/default/max values into the wait_agent tool schema.
  • wait_agent now uses the configured default when timeout_ms is omitted and rejects explicit values outside the configured min/max range instead of silently clamping them.
  • Updated the generated config schema and config-lock test coverage for the new fields.

@andmis andmis requested a review from a team as a code owner May 13, 2026 17:54
@jif-oai jif-oai changed the title Configurable max+default wait times for multi_agent_v2 Make multi_agent_v2 wait_agent timeouts configurable May 13, 2026
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

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

lgtm

@andmis andmis merged commit 7c57a59 into main May 13, 2026
27 checks passed
@andmis andmis deleted the andrey/allow-configurable-default-and-max-wait-times branch May 13, 2026 21:43
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants