mirror of
https://github.com/openai/codex.git
synced 2026-04-29 19:03:02 +03:00
fix: attempt to reduce high cpu usage when using collab (#9776)
Reproduce with a prompt like this with collab enabled: ``` Examine the code at <some subdirectory with a deeply nested project>. Find the most urgent issue to resolve and describe it to me. ``` Existing behavior causes the top-level agent to busy wait on subagents.
This commit is contained in:
@@ -8,6 +8,7 @@ use crate::tools::handlers::apply_patch::create_apply_patch_freeform_tool;
|
||||
use crate::tools::handlers::apply_patch::create_apply_patch_json_tool;
|
||||
use crate::tools::handlers::collab::DEFAULT_WAIT_TIMEOUT_MS;
|
||||
use crate::tools::handlers::collab::MAX_WAIT_TIMEOUT_MS;
|
||||
use crate::tools::handlers::collab::MIN_WAIT_TIMEOUT_MS;
|
||||
use crate::tools::registry::ToolRegistryBuilder;
|
||||
use codex_protocol::config_types::WebSearchMode;
|
||||
use codex_protocol::dynamic_tools::DynamicToolSpec;
|
||||
@@ -517,7 +518,7 @@ fn create_wait_tool() -> ToolSpec {
|
||||
"timeout_ms".to_string(),
|
||||
JsonSchema::Number {
|
||||
description: Some(format!(
|
||||
"Optional timeout in milliseconds. Defaults to {DEFAULT_WAIT_TIMEOUT_MS} and max {MAX_WAIT_TIMEOUT_MS}."
|
||||
"Optional timeout in milliseconds. Defaults to {DEFAULT_WAIT_TIMEOUT_MS}, min {MIN_WAIT_TIMEOUT_MS}, and max {MAX_WAIT_TIMEOUT_MS}. Avoid tight polling loops; prefer longer waits (seconds to minutes)."
|
||||
)),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user