Files
crewAI/lib
Devin AI ef64d5d0c8 fix: reset messages and iterations in CrewAgentExecutor between task executions
When the same CrewAgentExecutor instance is reused across multiple
sequential tasks, messages and iterations were accumulating instead of
being reset. This caused duplicate system prompts, context window
explosion, and eventually crashes with empty LLM responses.

Reset self.messages and self.iterations at the start of invoke() and
ainvoke() to ensure each task execution starts with a clean slate.

Fixes #4319, #4389, #4415

Co-Authored-By: João <joao@crewai.com>
2026-02-08 08:56:15 +00:00
..