diff --git a/codex-rs/core/src/tools/spec_tests.rs b/codex-rs/core/src/tools/spec_tests.rs index 3142dd46a3..453bf9f78f 100644 --- a/codex-rs/core/src/tools/spec_tests.rs +++ b/codex-rs/core/src/tools/spec_tests.rs @@ -2106,6 +2106,9 @@ fn tool_suggest_description_lists_discoverable_tools() { assert!( description.contains("skills; MCP servers: sample-docs; app connectors: connector_sample") ); + assert!(description.contains( + "if the user is actively using an installed plugin and one of that plugin's discoverable connectors/apps is not installed but can be installed, suggest installing that connector/app immediately" + )); assert!(description.contains("DO NOT explore or recommend tools that are not on this list.")); let JsonSchema::Object { required, .. } = parameters else { panic!("expected object parameters"); diff --git a/codex-rs/core/templates/search_tool/tool_suggest_description.md b/codex-rs/core/templates/search_tool/tool_suggest_description.md index fcf599c397..21e86a31c8 100644 --- a/codex-rs/core/templates/search_tool/tool_suggest_description.md +++ b/codex-rs/core/templates/search_tool/tool_suggest_description.md @@ -7,6 +7,8 @@ Use this ONLY when: - And tool_search fails to find a good match - AND the user's request strongly matches one of the discoverable tools listed below. +Exception: if the user is actively using an installed plugin and one of that plugin's discoverable connectors/apps is not installed but can be installed, suggest installing that connector/app immediately. In that case, do not wait for `tool_search` or other fallback attempts to fail first. + Tool suggestions should only use the discoverable tools listed here. DO NOT explore or recommend tools that are not on this list. Discoverable tools: