fix(agent): 自动压缩死循环修复 — keepTail 预算化 + 摘要执行可靠性 - #23
Open
Rogers-F wants to merge 12 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
长会话(单指令 + 连续读大文件)中自动压缩死循环:258K 窗口压缩后仍剩 187K(80.8%),每 4-5 分钟重压一次,最小触发间隔仅 239 token。
根因
修复
无协议变更、无新增配置、摘要 prompt 未动,请求保持 `{model, messages}` 极简形态。
验证
12 个提交按阶段递进,各步独立可回溯。