Rename multi-agent wait tool to wait_agent (#14631)

- rename the multi-agent tool name the model sees to wait_agent
- update the model-facing prompts and tool descriptions to match

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-03-13 14:38:05 -07:00
committed by GitHub
parent 6720caf778
commit cfd97b36da
7 changed files with 58 additions and 54 deletions

View File

@@ -1053,7 +1053,7 @@ fn create_spawn_agent_tool(config: &ToolsConfig) -> ToolSpec {
- For code-edit subtasks, decompose work so each delegated task has a disjoint write set.
### After you delegate
- Call wait very sparingly. Only call wait when you need the result immediately for the next critical-path step and you are blocked until it returns.
- Call wait_agent very sparingly. Only call wait_agent when you need the result immediately for the next critical-path step and you are blocked until it returns.
- Do not redo delegated subagent tasks yourself; focus on integrating results or tackling non-overlapping work.
- While the subagent is running in the background, do meaningful non-overlapping work immediately.
- Do not repeatedly wait by reflex.
@@ -1290,7 +1290,7 @@ fn create_resume_agent_tool() -> ToolSpec {
ToolSpec::Function(ResponsesApiTool {
name: "resume_agent".to_string(),
description:
"Resume a previously closed agent by id so it can receive send_input and wait calls."
"Resume a previously closed agent by id so it can receive send_input and wait_agent calls."
.to_string(),
strict: false,
defer_loading: None,
@@ -1303,7 +1303,7 @@ fn create_resume_agent_tool() -> ToolSpec {
})
}
fn create_wait_tool() -> ToolSpec {
fn create_wait_agent_tool() -> ToolSpec {
let mut properties = BTreeMap::new();
properties.insert(
"ids".to_string(),
@@ -1325,7 +1325,7 @@ fn create_wait_tool() -> ToolSpec {
);
ToolSpec::Function(ResponsesApiTool {
name: "wait".to_string(),
name: "wait_agent".to_string(),
description: "Wait for agents to reach a final status. Completed statuses may include the agent's final message. Returns empty status when timed out. Once the agent reaches a final status, a notification message will be received containing the same completed status."
.to_string(),
strict: false,
@@ -2441,7 +2441,7 @@ pub(crate) fn build_specs_with_discoverable_tools(
use crate::tools::handlers::multi_agents::ResumeAgentHandler;
use crate::tools::handlers::multi_agents::SendInputHandler;
use crate::tools::handlers::multi_agents::SpawnAgentHandler;
use crate::tools::handlers::multi_agents::WaitHandler;
use crate::tools::handlers::multi_agents::WaitAgentHandler;
use std::sync::Arc;
let mut builder = ToolRegistryBuilder::new();
@@ -2835,7 +2835,7 @@ pub(crate) fn build_specs_with_discoverable_tools(
);
push_tool_spec(
&mut builder,
create_wait_tool(),
create_wait_agent_tool(),
false,
config.code_mode_enabled,
);
@@ -2848,7 +2848,7 @@ pub(crate) fn build_specs_with_discoverable_tools(
builder.register_handler("spawn_agent", Arc::new(SpawnAgentHandler));
builder.register_handler("send_input", Arc::new(SendInputHandler));
builder.register_handler("resume_agent", Arc::new(ResumeAgentHandler));
builder.register_handler("wait", Arc::new(WaitHandler));
builder.register_handler("wait_agent", Arc::new(WaitAgentHandler));
builder.register_handler("close_agent", Arc::new(CloseAgentHandler));
}