mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-12 05:52:39 +00:00
When the flow-based AgentExecutor reaches finalize() with an AgentAction
still in current_answer (e.g. after max iterations or all todos complete),
the previous code returned "skipped" which left invoke() with a non-AgentFinish
answer, raising RuntimeError('Agent execution ended without reaching a final
answer.'). Now we convert the AgentAction to AgentFinish using its result or
text, preventing the crash.