Implements context recovery feature that automatically injects recent
messages from session history into the system prompt after a compaction
event. This makes context transitions smoother as the agent maintains
awareness of recent conversation.
Configuration:
- agents.defaults.compaction.contextRecovery.messages: number (0-50)
Default: 0 (disabled)
When enabled:
1. After compaction, the next turn checks if recovery is needed
2. Fetches the configured number of recent messages from session transcript
3. Formats them as a 'Recent Conversation' block in the system prompt
4. Tracks which compaction was recovered to avoid duplicate recovery
Closes#3593