diff --git a/lib/crewai/src/crewai/crew.py b/lib/crewai/src/crewai/crew.py index db49b3a1e..ea0272c04 100644 --- a/lib/crewai/src/crewai/crew.py +++ b/lib/crewai/src/crewai/crew.py @@ -1918,10 +1918,6 @@ class Crew(FlowTrackable, BaseModel): token_usage=self.token_usage, ) - # OUTPUT/EXECUTION_END run before the kickoff-completed event (mirroring - # the flow OUTPUT-before-FlowFinishedEvent ordering) so a HookAborted - # prevents a spurious completed signal and any payload replacement is - # honored on the returned output. output_ctx = OutputContext(crew=self, output=crew_output, payload=crew_output) dispatch(InterceptionPoint.OUTPUT, output_ctx) crew_output = output_ctx.payload diff --git a/lib/crewai/src/crewai/flow/runtime/__init__.py b/lib/crewai/src/crewai/flow/runtime/__init__.py index 812d83268..6733c4645 100644 --- a/lib/crewai/src/crewai/flow/runtime/__init__.py +++ b/lib/crewai/src/crewai/flow/runtime/__init__.py @@ -1476,9 +1476,6 @@ class Flow(BaseModel, Generic[T], metaclass=FlowMeta): else (resumed_method_output if emit else result) ) - # A resumed flow completes here rather than in kickoff_async, so the - # OUTPUT/EXECUTION_END seams must fire on this path too (before - # FlowFinishedEvent) to expose the final result to policy hooks. from crewai.hooks.contexts import ExecutionEndContext, OutputContext from crewai.hooks.dispatch import InterceptionPoint, dispatch diff --git a/lib/crewai/tests/hooks/test_interception_conformance.py b/lib/crewai/tests/hooks/test_interception_conformance.py index 3593699d5..9c2965bd2 100644 --- a/lib/crewai/tests/hooks/test_interception_conformance.py +++ b/lib/crewai/tests/hooks/test_interception_conformance.py @@ -2,8 +2,7 @@ For each wired point this suite asserts the shared contract: the probe hook sees a well-shaped payload, an in-place/returned modification is honored, and a -:class:`HookAborted` interrupts the step. Enterprise / ACS adapters build -against these guarantees. +:class:`HookAborted` interrupts the step. """ from __future__ import annotations