Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codex-rs/core/src/tools/handlers/multi_agents_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ fn wait_agent_tool_parameters_v2(options: WaitAgentTimeoutOptions) -> JsonSchema
let properties = BTreeMap::from([(
"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.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

options.default_timeout_ms, options.min_timeout_ms, options.max_timeout_ms,
))),
)]);
Expand Down
4 changes: 3 additions & 1 deletion codex-rs/core/src/tools/handlers/multi_agents_spec_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ fn wait_agent_tool_v2_uses_timeout_only_summary_output() {
properties
.get("timeout_ms")
.and_then(|schema| schema.description.as_deref()),
Some("Timeout in milliseconds. Defaults to 30000, min 10000, max 3600000.")
Some(
"Timeout in milliseconds. Defaults to 30000, min 10000, max 3600000. Prefer longer waits (minutes) to avoid busy polling."
)
);
assert_eq!(parameters.required.as_ref(), None);
assert_eq!(
Expand Down
Loading