From ce1d9abf117651965ffb312d94929267190a3149 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Tue, 10 Mar 2026 16:25:08 -0700 Subject: [PATCH] Clarify close_agent tool description (#14269) - clarify the `close_agent` tool description so it nudges models to close agents they no longer need - keep the change scoped to the tool spec text only Co-authored-by: Codex --- codex-rs/core/src/tools/spec.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codex-rs/core/src/tools/spec.rs b/codex-rs/core/src/tools/spec.rs index 5d681f64b..3a9c9eb58 100644 --- a/codex-rs/core/src/tools/spec.rs +++ b/codex-rs/core/src/tools/spec.rs @@ -1205,8 +1205,7 @@ fn create_close_agent_tool() -> ToolSpec { ToolSpec::Function(ResponsesApiTool { name: "close_agent".to_string(), - description: "Close an agent when it is no longer needed and return its last known status." - .to_string(), + description: "Close an agent when it is no longer needed and return its last known status. Don't keep agents open for too long if they are not needed anymore.".to_string(), strict: false, parameters: JsonSchema::Object { properties,