Problem
MessageWindowChatMemory only drops the oldest messages. Channel conversations grow without bound, and once past the context window we truncate from the front — breaking tool-call sequences mid-flight, with no summarization and no token awareness.
Also, FileSystemChatMemoryRepository stores a flat List per channel: no per-message identity, no timestamps, so nothing can later ask "what happened here since yesterday?"
Proposal
Replace MessageWindowChatMemory + MessageChatMemoryAdvisor with spring-ai-session — an event-sourced session layer with turn-aware compaction (SlidingWindow, TurnWindow, TokenCount, RecursiveSummarization strategies; TurnCount/TokenCount/Composite triggers), plus SessionEventTools, EventFilter, and TTL-based retention.
Problem
MessageWindowChatMemory only drops the oldest messages. Channel conversations grow without bound, and once past the context window we truncate from the front — breaking tool-call sequences mid-flight, with no summarization and no token awareness.
Also, FileSystemChatMemoryRepository stores a flat List per channel: no per-message identity, no timestamps, so nothing can later ask "what happened here since yesterday?"
Proposal
Replace MessageWindowChatMemory + MessageChatMemoryAdvisor with spring-ai-session — an event-sourced session layer with turn-aware compaction (SlidingWindow, TurnWindow, TokenCount, RecursiveSummarization strategies; TurnCount/TokenCount/Composite triggers), plus SessionEventTools, EventFilter, and TTL-based retention.