Skip to content

Preserve goal context during compaction#22174

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

Preserve goal context during compaction#22174
etraut-openai wants to merge 1 commit into
mainfrom
etraut/preserve-goal-context-compaction

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

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

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
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