From 07aa7c0558a7b75bfac7d01f96adab895179e7f2 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Mon, 6 Apr 2026 23:51:21 +0800 Subject: [PATCH] fix: skip create_agent_executor for resuming agents --- lib/crewai/src/crewai/crews/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/crewai/src/crewai/crews/utils.py b/lib/crewai/src/crewai/crews/utils.py index 20cecc3b4..3c2973c4c 100644 --- a/lib/crewai/src/crewai/crews/utils.py +++ b/lib/crewai/src/crewai/crews/utils.py @@ -105,6 +105,9 @@ def setup_agents( agent.function_calling_llm = function_calling_llm # type: ignore[attr-defined] if not agent.step_callback: # type: ignore[attr-defined] agent.step_callback = step_callback # type: ignore[attr-defined] + executor = getattr(agent, "agent_executor", None) + if executor and getattr(executor, "_resuming", False): + continue agent.create_agent_executor()