Recommend longer waits in the v2 wait_agent schema - #35594
Conversation
## What changed Update the v2 `wait_agent` timeout description to recommend minute-scale waits that avoid busy polling, matching the existing v1 guidance. Extend the tool-spec test to cover the updated description. GitOrigin-RevId: 615dfbd7cb5038013131ae8cb959d35e07c6f48a
53585e3 to
8a1c941
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53585e39a0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "timeout_ms".to_string(), | ||
| JsonSchema::number(Some(format!( | ||
| "Timeout in milliseconds. Defaults to {}, min {}, max {}.", | ||
| "Timeout in milliseconds. Defaults to {}, min {}, max {}. Prefer longer waits (minutes) to avoid busy polling.", |
There was a problem hiding this comment.
Make wait guidance respect the configured maximum
When a valid v2 configuration sets max_wait_timeout_ms below 60 seconds, the schema simultaneously reports that maximum and recommends minute-scale waits. Following the new recommendation can therefore make the model pass a timeout that the v2 handler rejects as above the configured maximum. Recommend longer values within the configured range instead, and cover the config-backed schema behavior in a core integration test rather than testing only the one-hour maximum.
AGENTS.md reference: AGENTS.md:L114-L118
Useful? React with 👍 / 👎.
Recommend longer waits in the v2 wait_agent schema
What changed
Update the v2
wait_agenttimeout description to recommend minute-scale waitsthat avoid busy polling, matching the existing v1 guidance. Extend the tool-spec
test to cover the updated description.