Skip to content

Fix the session compaction#1531

Merged
dgageot merged 2 commits intodocker:mainfrom
dgageot:fix-compaction-dga
Jan 30, 2026
Merged

Fix the session compaction#1531
dgageot merged 2 commits intodocker:mainfrom
dgageot:fix-compaction-dga

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Jan 29, 2026

This is a continuation of #1520

rumpl and others added 2 commits January 28, 2026 22:22
We were being stupid, the main session calls sess.GetMessages, which
potentially trims things, either the number of messages if configured
that way, or by removing old tool call results. But then we would use
GetAllMessages when compacting, resulting in a compaction that doesn't
work because the context that we are sending is potentially bigger than
the LLMs max tokens limit.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot force-pushed the fix-compaction-dga branch from 4414a84 to 38ba5ea Compare January 30, 2026 10:35
@dgageot dgageot changed the title Fix compaction Fix the session compaction Jan 30, 2026
@dgageot dgageot marked this pull request as ready for review January 30, 2026 10:36
@dgageot dgageot requested a review from a team as a code owner January 30, 2026 10:36
@dgageot dgageot merged commit 1ea5ff7 into docker:main Jan 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants