You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow up on #1629 as it was not addressed. It looks like when Crew.kickoff_for_each() is called for a crew that contains ConditionalTask items, the copied crews cast the ConditionalTask as a Task instead. As a result conditional task crews are broken when running with kickoff_for_each().
Steps to Reproduce
Create a crew with a conditional task
Run crew.kickoff_for_each(inputs=[...])
See that conditional tasks are always run and can be debugged to return type=Task, not type=ConditionalTask
Expected behavior
ConditionalTask items should be copied as ConditionalTasks, not Tasks.
Description
Follow up on #1629 as it was not addressed. It looks like when
Crew.kickoff_for_each()
is called for a crew that contains ConditionalTask items, the copied crews cast the ConditionalTask as a Task instead. As a result conditional task crews are broken when running withkickoff_for_each()
.Steps to Reproduce
crew.kickoff_for_each(inputs=[...])
type=Task
, nottype=ConditionalTask
Expected behavior
ConditionalTask items should be copied as ConditionalTasks, not Tasks.
Screenshots/Code snippets
N/A
Operating System
Ubuntu 20.04
Python Version
3.10
crewAI Version
0.102.0
crewAI Tools Version
N/A
Virtual Environment
Venv
Evidence
https://github.com/crewAIInc/crewAI/blob/main/src/crewai/task.py#L644-L649 should be pretty evident that we're missing type handling.
Possible Solution
Add type handling when copying tasks.
Additional context
N/A
The text was updated successfully, but these errors were encountered: