0.2.4
Fix
Infinite tool-call loop from over-aggressive trailing-message drop
The unconditional trailing-message drop introduced in 0.2.2 removed assistant messages that had pending (non-completed) tool calls. The model would then re-issue the tool call on the next turn, producing another trailing assistant+tool message that got dropped again — an infinite loop.
Fix: before dropping a trailing non-user message, check if it contains a pending tool part. If so, stop dropping and log a warning instead. Completed tool parts are still dropped safely.