Files
crewAI/lib
Devin AI efd5c90fd2 fix: prevent shared LLM stop words mutation across agents (#5141)
When multiple agents share the same LLM instance, the executor was
directly mutating the shared LLM's stop words list. This caused
cross-agent state pollution where stop words would accumulate across
agents and across multiple crew.kickoff() calls.

Fix: create a shallow copy of the LLM before merging stop words,
so each executor gets its own isolated stop word list. Only copy
when new stop words are actually being added to avoid unnecessary
allocations.

Applied to both CrewAgentExecutor and experimental AgentExecutor.

Co-Authored-By: João <joao@crewai.com>
2026-03-27 14:11:03 +00:00
..
2026-03-27 11:26:04 +08:00