fix: preserve condensation summary during task resume (#11487)#11488
Merged
hannesrudolph merged 1 commit intomainfrom Feb 16, 2026
Merged
fix: preserve condensation summary during task resume (#11487)#11488hannesrudolph merged 1 commit intomainfrom
hannesrudolph merged 1 commit intomainfrom
Conversation
Collaborator
|
@roomote please run the review workflow on this. |
Contributor
Reviewed the PR. All checks pass, no issues found. Tests verified:
Review notes:
|
hannesrudolph
approved these changes
Feb 16, 2026
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.
Related GitHub Issue
Closes: #11487
Roo Code Task Context (Optional)
No Roo Code task context for this PR
Description
When a task completes after condensation and the user sends a new message to resume, the
resumeTaskFromHistory()method strips the last user message to merge it with the new user input. However, after condensation the summary IS the last user message (role: "user" withisSummaryandcondenseIdmetadata). Stripping it destroys the condensation metadata, causing allcondenseParent-tagged messages to become orphaned.getEffectiveApiHistory()then correctly restores them to active status — effectively undoing the condensation and sending the full history to the API.Fix: Added an
isSummaryguard as the first branch in the resume flow's message handling. When the last message is a condensation summary, the history is preserved intact and the new user message is added separately, preserving condensation state.Test Procedure
cd src && npx vitest run core/condense/__tests__/rewind-after-condense.spec.ts— 19 tests pass including 2 new regression testscd src && npx vitest run core/condense/__tests__/— 122 tests passcd src && npx vitest run core/context-management/__tests__/context-management.spec.ts— 40 tests passcd src && npx vitest run core/message-manager/index.spec.ts— 26 tests passManual verification steps:
Pre-Submission Checklist
Screenshots / Videos
No UI changes in this PR
Documentation Updates
Additional Notes
The fix is a 10-line addition that adds an
isSummarycheck before the existing role-based message handling inresumeTaskFromHistory(). It does not change any existing behavior for non-summary messages.Get in Touch
@SannidhyaSah