From 4e15d49176604bcea49173da4490d7bb724e6b02 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Mon, 6 Apr 2026 20:45:57 +0800 Subject: [PATCH] fix: wire executor back-references in BaseAgent.from_checkpoint --- lib/crewai/src/crewai/agents/agent_builder/base_agent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/crewai/src/crewai/agents/agent_builder/base_agent.py b/lib/crewai/src/crewai/agents/agent_builder/base_agent.py index 9fc71a541..90f352619 100644 --- a/lib/crewai/src/crewai/agents/agent_builder/base_agent.py +++ b/lib/crewai/src/crewai/agents/agent_builder/base_agent.py @@ -340,6 +340,9 @@ class BaseAgent(BaseModel, ABC, metaclass=AgentMeta): if isinstance(entity, cls): if entity.execution_context is not None: apply_execution_context(entity.execution_context) + if entity.agent_executor is not None: + entity.agent_executor.agent = entity + entity.agent_executor._resuming = True return entity raise ValueError(f"No {cls.__name__} found in checkpoint: {path}")