Skip to content

Preserve goal context during compaction - #22174

Closed
etraut-openai wants to merge 1 commit into
mainfrom
etraut/preserve-goal-context-compaction
Closed

etraut-openai wants to merge 1 commit into
mainfrom
etraut/preserve-goal-context-compaction

Conversation

@etraut-openai

@etraut-openai etraut-openai commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Goal continuation steering is hidden user context, but compaction still filtered contextual user messages unless they parsed as visible user messages or hook prompts. That can let an older real user steer regain salience after compaction, which is the failure mode described in #21291.

This PR adds a generic opt-in on ContextualUserFragment for fragments that should survive compaction. GoalContext opts in, local compaction preserves those contextual user messages when rebuilding user-message history, and remote compaction keeps them through the same retention path used for hook prompts.

@etraut-openai
etraut-openai requested a review from a team as a code owner May 11, 2026 16:55
@etraut-openai
etraut-openai marked this pull request as draft May 11, 2026 17:28
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant