From 3786ec3247e75abe190fabdae5c1612f136e6c97 Mon Sep 17 00:00:00 2001 From: ViditOstwal Date: Fri, 7 Aug 2026 20:28:13 +0530 Subject: [PATCH] Delegate fallback persist to RuntimeFlow explicitly. Call _persist_method_completion via RuntimeFlow cast instead of a mixin TYPE_CHECKING stub so persistence stays owned by the Flow engine. --- .../src/crewai/experimental/conversational_mixin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/crewai/src/crewai/experimental/conversational_mixin.py b/lib/crewai/src/crewai/experimental/conversational_mixin.py index 119ab2ac3..45780a1d4 100644 --- a/lib/crewai/src/crewai/experimental/conversational_mixin.py +++ b/lib/crewai/src/crewai/experimental/conversational_mixin.py @@ -153,9 +153,6 @@ class _ConversationalMixin: def kickoff(self, *args: Any, **kwargs: Any) -> Any: pass - def _persist_method_completion(self, method_name: Any) -> None: - pass - @property def method_outputs(self) -> list[Any]: pass @@ -897,9 +894,12 @@ class _ConversationalMixin: if not isinstance(last_entry, dict) or not last_entry.get("method"): return + from crewai.flow.runtime import Flow as RuntimeFlow from crewai.flow.types import FlowMethodName - self._persist_method_completion(FlowMethodName(str(last_entry["method"]))) + cast(RuntimeFlow[Any], self)._persist_method_completion( + FlowMethodName(str(last_entry["method"])) + ) def _apply_pending_conversational_turn(self) -> None: """Drain the stashed user message + classify if intents configured.