From 14b3934bc41cbdafc9c9d1b120e85eeabdc86d59 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Wed, 8 Apr 2026 20:04:08 +0800 Subject: [PATCH] fix: use sanitized tool name in sync code path too --- lib/crewai/src/crewai/utilities/tool_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/crewai/src/crewai/utilities/tool_utils.py b/lib/crewai/src/crewai/utilities/tool_utils.py index 42bdf52cd..b77eb9192 100644 --- a/lib/crewai/src/crewai/utilities/tool_utils.py +++ b/lib/crewai/src/crewai/utilities/tool_utils.py @@ -216,7 +216,7 @@ def execute_tool_and_check_finality( if tool: tool_input = tool_calling.arguments if tool_calling.arguments else {} hook_context = ToolCallHookContext( - tool_name=tool_calling.tool_name, + tool_name=sanitized_tool_name, tool_input=tool_input, tool=tool, agent=agent, @@ -240,7 +240,7 @@ def execute_tool_and_check_finality( tool_result = tool_usage.use(tool_calling, agent_action.text) after_hook_context = ToolCallHookContext( - tool_name=tool_calling.tool_name, + tool_name=sanitized_tool_name, tool_input=tool_input, tool=tool, agent=agent,