mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-08 03:58:23 +00:00
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>