From b06bd1d24c009b8e5e24ad858ae1e71d650bba7b Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 4 Jan 2026 18:50:45 +0100 Subject: [PATCH] fix(tools.ts): sync with active tools when no saved state Hook was showing all tools as enabled even though only 4 were active. Now initializes from pi.getActiveTools() to match actual state. --- packages/coding-agent/examples/hooks/tools.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/examples/hooks/tools.ts b/packages/coding-agent/examples/hooks/tools.ts index 7cd02862..4ee3aa2b 100644 --- a/packages/coding-agent/examples/hooks/tools.ts +++ b/packages/coding-agent/examples/hooks/tools.ts @@ -57,8 +57,8 @@ export default function toolsHook(pi: HookAPI) { enabledTools = new Set(savedTools.filter((t: string) => allTools.includes(t))); applyTools(); } else { - // No saved state - enable all tools by default - enabledTools = new Set(allTools); + // No saved state - sync with currently active tools + enabledTools = new Set(pi.getActiveTools()); } }