From 2d5f802daf254c94405a66830f75c1c630178964 Mon Sep 17 00:00:00 2001 From: BayLee4 <63376748+BayLee4@users.noreply.github.com> Date: Wed, 1 Apr 2026 15:26:08 +0200 Subject: [PATCH] fix(coding-agent): do not enable web_search if explicitly disabled (#593) Co-authored-by: le-cameleon <200889489+le-cameleon@users.noreply.github.com> --- README.md | 1 - packages/coding-agent/src/sdk.ts | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a325fdee..d70019483 100644 --- a/README.md +++ b/README.md @@ -1240,7 +1240,6 @@ Use `--tools ` to restrict available built-in tools. | `todo_write` | Phased task tracking with progress management | | `fetch` | Fetch and extract URL content | | `web_search` | Multi-provider web search | -| `deep_search` | AI-powered deep research with synthesized results (Exa) | | `write` | Create/overwrite files | | `generate_image` | Generate or edit images using Gemini image models | diff --git a/packages/coding-agent/src/sdk.ts b/packages/coding-agent/src/sdk.ts index 654802369..4c35a1a5d 100644 --- a/packages/coding-agent/src/sdk.ts +++ b/packages/coding-agent/src/sdk.ts @@ -1009,7 +1009,9 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {} } // Add web search tools - customTools.push(...getSearchTools()); + if (options.toolNames?.includes("web_search")) { + customTools.push(...getSearchTools()); + } // Discover and load custom tools from .omp/tools/, .claude/tools/, etc. const builtInToolNames = builtinTools.map(t => t.name);