[google/syzkaller] 29233e: pkg/aflow: implement token-based context compression

0 views
Skip to first unread message

Aleksandr Nogikh

unread,
May 8, 2026, 4:04:37 PMMay 8
to syzk...@googlegroups.com
Branch: refs/heads/gh-readonly-queue/master/pr-7211-3c3c38add0251b4319dd9a2dbf2c8a570c14a118
Home: https://github.com/google/syzkaller
Commit: 29233ece713919081e9069c2a18be92526041f39
https://github.com/google/syzkaller/commit/29233ece713919081e9069c2a18be92526041f39
Author: Aleksandr Nogikh <nog...@google.com>
Date: 2026-05-08 (Fri, 08 May 2026)

Changed paths:
M pkg/aflow/flow/patching/iteration.go
M pkg/aflow/flow/patching/patching.go
M pkg/aflow/llm_agent.go
M pkg/aflow/llm_agent_test.go
M pkg/aflow/llm_tool.go
A pkg/aflow/testdata/TestTokenCompression.llm.json
A pkg/aflow/testdata/TestTokenCompression.trajectory.json
M pkg/aflow/tool/codeexpert/codeexpert.go
M pkg/aflow/trajectory/trajectory.go

Log Message:
-----------
pkg/aflow: implement token-based context compression

Introduce CompressTokens to dynamically truncate agent context histories
based on token count rather than message count.

Unlike the existing SummaryWindow (which relies on a fixed number of messages),
CompressTokens handles the massive variance in message sizes (e.g., small tool
replies vs. massive source code searches) predictably. When the threshold is
exceeded, the agent uses a cheaper model (GoodBalancedModel) to summarize
the history, truncating it down to just the anchor prompt and the new summary.

Also add a `patching-compressed` workflow registration (with a 250k token
threshold) to allow experimenting with this mechanism.



To unsubscribe from these emails, change your notification settings at https://github.com/google/syzkaller/settings/notifications

Aleksandr Nogikh

unread,
May 8, 2026, 4:17:09 PMMay 8
to syzk...@googlegroups.com
Branch: refs/heads/master
Reply all
Reply to author
Forward
0 new messages