From 40d590623e19626bbafd428a8252c04c90537802 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Wed, 26 Aug 2026 20:34:06 +0200 Subject: [PATCH] ui: fall back to global defaults when agentic flow has no tool policy Passing empty disabled sets bypassed the global defaults and could enable tools for callers that do not pass a policy yet. Assisted-by: pi --- tools/ui/src/lib/stores/agentic/index.svelte.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/ui/src/lib/stores/agentic/index.svelte.ts b/tools/ui/src/lib/stores/agentic/index.svelte.ts index 4d94519db7..b58cba15b4 100644 --- a/tools/ui/src/lib/stores/agentic/index.svelte.ts +++ b/tools/ui/src/lib/stores/agentic/index.svelte.ts @@ -334,9 +334,10 @@ class AgenticStore { } } + // callers without an explicit policy fall back to the global defaults const tools = toolsStore.getEnabledToolsForLLM( - new Set(toolPolicy?.disabledTools ?? []), - new Set(toolPolicy?.disabledToolCategories ?? []) + new Set(toolPolicy?.disabledTools ?? toolsStore.disabledTools), + new Set(toolPolicy?.disabledToolCategories ?? toolsStore.disabledToolCategories) ); if (tools.length === 0) {