Feature/compaction handoff - #201
Merged
Merged
Conversation
…ages verbatim After compaction the prompt opened with a bare "Conversation summary:" user message; the original request was gone and nothing told the model a previous instance had written the text. The summary is now rendered at prompt-build time as a hand-off message that frames it as such and embeds the user's earlier messages verbatim (tool results and older summaries excluded, newest-first within a budget). Stored messages and the UI divider are unchanged.
…, retry on tool-call answers - The compaction prompt asks for a hand-off to another instance instead of a summary: what the user asked for and expects, progress, verified facts with paths, next steps, open questions. Tool calls are forbidden. - Compaction now runs before a pending user message is appended, so a fresh request follows the hand-off instead of being folded into it. - The request keeps the tool definitions (dropping them would invalidate the cached prompt prefix). A response without text is asked once more with a reminder; a second failure fails the turn instead of storing an empty summary. Thinking blocks no longer leak into the summary.
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.
Rework "compaction" as a hand-off.