Repository navigation
fix(agent-runtime): resume active turns from the compaction checkpoint - #2513
Merged
Merged
Conversation
Keep recovery notices ahead of the retained request when summary generation fails. Apply active-turn resume framing only to successful checkpoints.
Exercise the runtime continuation path so a later steering message stays ahead of any further model work after compaction.
kurtmj93
marked this pull request as ready for review
November 21, 2026 23:22
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 / 概要
ADR 0136 keeps the active user request across compaction so the model can continue the same task. In #2512, the fresh checkpoint said setup was complete and homepage verification was next. Pi Desktop then presented the original setup request after the checkpoint, and the agent started rediscovering the environment.
For a successful active-turn checkpoint with a nonempty summary, one retained user request, and no reasoning to replay, the Desktop runtime now sends original request → checkpoint → any later user input. The checkpoint identifies the original request as the goal and describes the state to continue from. This matches the relative order in Codex's plaintext compaction path.
The history cutoff, retained messages, and checkpoint format stay the same. Failed-summary recovery keeps its notice ahead of the retained window. DeepSeek reasoning replay keeps the order summary → retained reasoning → user tail. Completed turns, native Pi sessions, and the visible transcript keep their existing behavior.
Requirement link / 需求关联
Closes #2512.
Verification
ec590a1). Shared package, runtime, sidecar bundle, and Rust host built. Agent-runtime suite passed with 2,116 tests and 1 skipped.dabbf76). 164 targeted tests passed. The sidecar tool-pair restore and context-usage checks passed all nine scenarios in Windows PowerShell. The host checkpoint restore check also passed across restart.