Part of #266
When session history > tier 5 budget: detect overflow, trigger async LLM summarization of oldest turns, store summary in Redis with TTL. Session start pre-computes if near threshold.
Acceptance Criteria
- Overflow detection: tier 5 history > 80% of budget triggers compression
- Async LLM summarization of oldest 20 turns → compact paragraph
- Summary stored in Redis: key
session:{id}:history_summary, TTL=7200s
- Session start checks if near threshold and pre-computes summary
- Unit tests with mocked LLM; integration test with simulated 50-turn session
Part of #266
When session history > tier 5 budget: detect overflow, trigger async LLM summarization of oldest turns, store summary in Redis with TTL. Session start pre-computes if near threshold.
Acceptance Criteria
session:{id}:history_summary, TTL=7200s