Files
crewAI/lib/crewai/tests
Lucas Gomide 3bb87532da
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (python) (push) Waiting to run
Check Documentation Broken Links / Check broken links (push) Waiting to run
Vulnerability Scan / pip-audit (push) Waiting to run
fix: dispatch execution_end hook on failed crew and flow executions (#6607)
* fix: dispatch execution_end hook on failed crew and flow executions

The `execution_end` interception point only fired after a successful
kickoff, so consumers never learned about failed runs. Crew kickoff
paths (`kickoff`/`akickoff`) and the flow runtime (`kickoff_async`,
`resume_async`) now dispatch it on the failure path too, with new
additive `status` ("completed"/"failed") and `error` fields on
`ExecutionEndContext`. Pairing flags guarantee exactly-once dispatch,
keep the start/end pairing invariant, and the original exception
propagates unchanged.

* fix: track execution_end pairing per invocation for reentrant flows

Reentrant kickoffs on the same Flow instance are supported (usage
aggregation already accommodates them), but the instance-level pairing
booleans let an inner kickoff's completion mark the outer execution as
ended, skipping the outer failure's `execution_end`. The pairing state
now lives in each `kickoff_async` invocation's locals, and the resume
path passes a per-invocation holder into `_resume_async_body`. Crew
keeps its instance flags since crew kickoffs are not reentrant on the
same instance (`kickoff_for_each` copies the crew).
2026-07-21 15:25:06 -04:00
..
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2026-06-14 04:19:48 -03:00
2026-07-09 15:30:16 -07:00
2026-06-18 14:14:54 -03:00
2026-06-14 04:19:48 -03:00
2026-02-13 21:34:37 -03:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2026-06-14 04:19:48 -03:00
2025-10-20 14:10:19 -07:00