From 73734a23a1cf114e6f3a7810d1aba4a3bc061e8c Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 23 Jan 2026 00:54:30 +0100 Subject: [PATCH] fix(coding-agent): only list built-in tools in system prompt Extension tools are already described via API tool definitions. Removes redundant 'Custom tool' fallback. --- packages/coding-agent/src/core/system-prompt.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/coding-agent/src/core/system-prompt.ts b/packages/coding-agent/src/core/system-prompt.ts index 9a577d72..dd13d3a9 100644 --- a/packages/coding-agent/src/core/system-prompt.ts +++ b/packages/coding-agent/src/core/system-prompt.ts @@ -94,10 +94,9 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions = {}): strin const docsPath = getDocsPath(); const examplesPath = getExamplesPath(); - // Build tools list based on selected tools - const tools = selectedTools || ["read", "bash", "edit", "write"]; - const toolsList = - tools.length > 0 ? tools.map((t) => `- ${t}: ${toolDescriptions[t] ?? "Custom tool"}`).join("\n") : "(none)"; + // Build tools list based on selected tools (only built-in tools with known descriptions) + const tools = (selectedTools || ["read", "bash", "edit", "write"]).filter((t) => t in toolDescriptions); + const toolsList = tools.length > 0 ? tools.map((t) => `- ${t}: ${toolDescriptions[t]}`).join("\n") : "(none)"; // Build guidelines based on which tools are actually available const guidelinesList: string[] = [];