From d6e04ba24db9bc57e328868ed40934e5fad9e305 Mon Sep 17 00:00:00 2001 From: lorenzejay Date: Wed, 21 Jan 2026 07:40:27 -0800 Subject: [PATCH] fix sync main issues --- lib/crewai/src/crewai/agent/core.py | 2 -- lib/crewai/src/crewai/experimental/agent_executor.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/crewai/src/crewai/agent/core.py b/lib/crewai/src/crewai/agent/core.py index 3336313e0..e84b02018 100644 --- a/lib/crewai/src/crewai/agent/core.py +++ b/lib/crewai/src/crewai/agent/core.py @@ -246,7 +246,6 @@ class Agent(BaseAgent): Can be a single A2AConfig/A2AClientConfig/A2AServerConfig, or a list of any number of A2AConfig/A2AClientConfig with a single A2AServerConfig. """, ) - executor_class: type[CrewAgentExecutor] | type[AgentExecutor] = Field( executor_class: type[CrewAgentExecutor] | type[AgentExecutor] = Field( default=CrewAgentExecutor, description="Class to use for the agent executor. Defaults to CrewAgentExecutor, can optionally use AgentExecutor.", @@ -1616,7 +1615,6 @@ class Agent(BaseAgent): ) return None - def _prepare_kickoff( def _prepare_kickoff( self, messages: str | list[LLMMessage], diff --git a/lib/crewai/src/crewai/experimental/agent_executor.py b/lib/crewai/src/crewai/experimental/agent_executor.py index ea6f41822..ac664ff68 100644 --- a/lib/crewai/src/crewai/experimental/agent_executor.py +++ b/lib/crewai/src/crewai/experimental/agent_executor.py @@ -1,6 +1,8 @@ from __future__ import annotations from collections.abc import Callable, Coroutine +from datetime import datetime +import json import threading import time from typing import TYPE_CHECKING, Any, Literal, cast @@ -541,6 +543,7 @@ class AgentExecutor(Flow[AgentReActState], CrewAgentExecutorMixin): @listen("execute_tool") def execute_tool_action(self) -> Literal["tool_completed", "tool_result_is_final"]: """Execute the tool action and handle the result.""" + try: action = cast(AgentAction, self.state.current_answer)