Files
crewAI/lib/crewai/tests
Devin AI 518c9afc8e Fix #5534: sync Crew.agents with task agents so input_files propagate
When a Task has an agent assigned but the Crew is built without an
explicit agents=[...] list, setup_agents iterates an empty list and
never wires agent.crew = crew. Downstream paths that rely on the crew
reference (task.prompt() file injection, crew_agent_executor file
lookups, delegation tools) then silently no-op, so input_files attached
at the Task level are ignored.

Add a model_validator that auto-populates Crew.agents with any agent
referenced by a task so the crew behaves the same whether agents=[...]
is passed explicitly or inferred from tasks, and cover the regression
with unit tests.

Co-Authored-By: João <joao@crewai.com>
2026-04-19 16:25:25 +00:00
..
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2025-10-20 14:10:19 -07:00
2026-03-24 19:03:35 +08:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-10-20 14:10:19 -07:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00