Add drainEvents utility to clear buffered events between turns and apply it in processInteractiveMessage and cmdCompress to avoid processing stale events from previous agent interactions.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>