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()); } }