Honor /compact summary when auto-summarization is disabled (#318132)
* Honor /compact summary when auto-summarization is disabled Fixes #311503. With chat.summarizeAgentConversationHistory.enabled=false the agent renders history via AgentConversationHistory, which replayed every turn's full tool-call history and ignored round.summary. After a manual /compact, the next turn rebuilt the entire pre-compaction context and the context window immediately refilled. AgentConversationHistory now finds the most recent summarized round (populated by normalizeSummariesOnRounds), drops the history it supersedes, emits the <conversation-summary> tag in place of that turn's user message, and replays only the rounds after the summary. This applies an existing summary but never triggers new summarization, which stays gated behind the setting. The no-summary path is unchanged. * Read summary rounds from a single source for index consistency
B
Bhavya U committed
0ca79e5072d49688937149a220c8da5fa2df61b0
Parent: 991f245
Committed by GitHub <noreply@github.com>
on 5/31/2026, 9:46:22 PM