Repository navigation
fix(context): consume resumed deltas without tool cache - #7424
Open
loopx-agent wants to merge 1 commit into
Open
loopx-agent wants to merge 1 commit into
loopx-agent wants to merge 1 commit into
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
This branch has not been deployed
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.
A resumed native session can retain its model context while the tool process has lost earlier Code Mode variables. Treating that empty tool cache as context loss made a consumer read a complete delta and then fetch the full capture again. The native delta instruction now distinguishes these two lifetimes and directs the Agent to use the complete delta with retained context. Unavailable baseline content, uncertain continuity and compaction still require same-capture full recovery.
The change stays in the existing TypeScript context codec. It adds no state, protocol field, configuration, authority or caller entrypoint. Cold/full output, confirmed-input clients and invalid-continuity fallback are byte-for-byte unchanged in the focused comparison. Native deltas gain 365 instruction bytes; whether this reduces actual model rereads remains a live-behavior qualification, not a measured fee or task-outcome benefit.
Validation:
中文:原生会话恢复后,模型上下文和 Code Mode 工具变量的生命周期不同。当前消费方曾因旧工具变量不存在,在读完差分后又读取全量。本修改在共享 codec 的原生差分指引中说明应使用保留的模型上下文与完整差分;所需基线不可用、连续性不确定和压缩后的原捕获恢复保持。冷启、确认输入的 Host 和失效回退字节不变;原生指引增加 365 字节,真实模型是否减少重读仍待实验验证。25 项 TS、245 项 Python、2 项真实原生合成链路以及标准 premerge 均通过,不宣称费用或解题收益。