From b34161ee5e97672b29a2f0cad1effb10f585a35e Mon Sep 17 00:00:00 2001 From: Clawd Date: Sun, 1 Mar 2026 10:06:07 -0800 Subject: fix: correct canUseTool callback signature --- src/main/claude/index.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main') diff --git a/src/main/claude/index.ts b/src/main/claude/index.ts index 8b71823..ebbf8a9 100644 --- a/src/main/claude/index.ts +++ b/src/main/claude/index.ts @@ -81,15 +81,16 @@ export async function sendMessage({ }), // Auto-allow MCP tools in research phase (where external data is most useful) ...(session.phase === "research" && mcpServers && { - canUseTool: async (toolName: string): Promise => { + canUseTool: async ( + toolName: string, + _input: Record, + _options: { signal: AbortSignal; toolUseID: string } + ): Promise => { // Auto-approve all MCP tools (they start with "mcp__") if (toolName.startsWith("mcp__")) { return { behavior: "allow" }; } - // For non-MCP tools, let the default permission flow handle it - // Return deny with interrupt:false to fall through to default behavior - // Actually, we need to return allow for tools that acceptEdits would allow - // For now, just allow all tools in research phase since it's read-heavy + // For non-MCP tools, allow them too since research is read-heavy return { behavior: "allow" }; }, }), -- cgit v1.2.3