Repository navigation
fix(agent): calibrate compaction from measured input - #6623
Merged
Merged
Conversation
Generated-by: Codex
Reap failed speculative compaction candidates so renewed budgets and output pruning are not blocked, align provider overflow classification with Maka's typed HTTP/SSE/image/quota/rate-limit diagnostics, and validate persisted context_breakdown on read. Generated-by: Antigravity
…ry tool retry - Rewrite compaction prompts and checkpoint handoff prefixes across en, zh-CN, and zh-TW for agent-oriented recovery without re-reading settled work. - Narrow Recall and RecallMore active-turn exclusion to uncompacted tail events (source_sequence > covered_through) so MidTurn checkpoints unlock earlier compacted messages of the active turn. - Index and project ToolCall names and unescaped arguments in Recall, remove the redundant SQLite JSON roundtrip, and rank multi-term matches by distinct matched term count with sublinear length normalization. - Prepend a compact ranked anchor directory on multi-hit Recall results and expose optional before/after context windows on the Recall model tool. - Retry non-native summary generation once with protocol-level tool_choice=none when a provider emits tool calls under advertised tools. Generated-by: Antigravity
M4n5ter
force-pushed
the
fix/measured-compaction
branch
from
November 4, 2026 12:53
6be24c6 to
86d78ec
Compare
30 tasks
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.
Summary
Main could block for compaction while provider-reported usage was still below the configured threshold: a separate full-history estimate was being compared against the summary input budget. A ready background summary was also adopted immediately, regardless of current pressure.
For a 500k window with a 425k adoption threshold, background preparation begins around 361k; it does not force adoption there or when the summary finishes.
Verification
Behavior coverage includes continuing with a measured prefix despite an over-window raw estimate, holding ready candidates below the threshold, preserving newer steering/tool results through adoption, frozen physical retry identity, handoff/restart, and provider overflow versus throttling/parameter failures. Existing lifecycle fixtures now use realistic usage and threshold ranges instead of relying on the previous trigger algorithm.
AI use
Tool(s) and scope: Codex implemented and reviewed the change and its behavioral tests. OpenCode V2 source provenance is recorded in
docs/code-origin-audit.mdandLICENSE.Checklist
Does this PR entail a change in behavior?