ce22eba7d0
Conversation history on long-running channel sessions (e.g. Feishu) grew unbounded until the provider returned a context-window-exceeded error. The existing reactive compaction only kicked in *after* the error, causing the user's message to be lost and requiring a resend. Add proactive_trim_turns() which estimates total character count and drops the oldest turns before the request reaches the provider. The budget (400 k chars ≈ 100 k tokens) leaves headroom for system prompt, memory context, and model output. Closes #3460