You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem / use case
After compaction the model only sees the summarizer's output plus a recent token tail. The original user messages and tool results are still in the session history, but they are no longer part of what the model sees. In practice this means requirements I stated at the start of a session, and constraints I set mid-session, stop being followed. Each subsequent compaction loses whatever the previous summary didn't carry forward, so degradation compounds over a long session.
There is also no config-level way to steer what must be preserved. The compaction summarizer runs without any system prompt or user-provided instructions. The experimental.session.compacting hook can replace the prompt, but it only receives { sessionID } — no per-invocation dynamic input — and it does not fire on the prune path.
Proposed solution
Keep user messages visible verbatim after compaction (at minimum the first message, optionally pinned ones), independent of the LLM summary. Since the history rows are retained anyway, this is a projection decision rather than a storage change.
A config-level way to supply persistent compaction instructions (for example a compaction.prompt or compaction.instructions field), and/or giving the compacting hook per-invocation input so it can decide dynamically what must be carried forward. Ideally the same mechanism applies to the prune path, which today preserves nothing.
This request is about fidelity semantics, not about restructuring the compaction pipeline.
Alternatives considered
The experimental.session.compacting hook: covers prompt replacement only; no config-level support and no deterministic retention semantics.
I have searched for similar requests. #37551 (closed, not planned) proposed reinjecting a prompt; PR #38103 (closed, unmerged) attempted verbatim user messages; PR #45125 (open) proposes a restoration document, but even if merged it remains summarizer-mediated, not deterministic retention. #42574 (open) asks for configurable compaction instructions but not for user-message retention. #41358 (open) asks to keep the original user goal in the summary — again summarizer-mediated. #16512 and #16960 describe the same underlying pain. I believe this request is still distinct: it asks for deterministic (not summarizer-mediated) retention, plus a config surface for compaction instructions.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem / use case
After compaction the model only sees the summarizer's output plus a recent token tail. The original user messages and tool results are still in the session history, but they are no longer part of what the model sees. In practice this means requirements I stated at the start of a session, and constraints I set mid-session, stop being followed. Each subsequent compaction loses whatever the previous summary didn't carry forward, so degradation compounds over a long session.
There is also no config-level way to steer what must be preserved. The compaction summarizer runs without any system prompt or user-provided instructions. The
experimental.session.compactinghook can replace the prompt, but it only receives{ sessionID }— no per-invocation dynamic input — and it does not fire on the prune path.Proposed solution
compaction.promptorcompaction.instructionsfield), and/or giving the compacting hook per-invocation input so it can decide dynamically what must be carried forward. Ideally the same mechanism applies to the prune path, which today preserves nothing.This request is about fidelity semantics, not about restructuring the compaction pipeline.
Alternatives considered
experimental.session.compactinghook: covers prompt replacement only; no config-level support and no deterministic retention semantics.Similar requests
I have searched for similar requests. #37551 (closed, not planned) proposed reinjecting a prompt; PR #38103 (closed, unmerged) attempted verbatim user messages; PR #45125 (open) proposes a restoration document, but even if merged it remains summarizer-mediated, not deterministic retention. #42574 (open) asks for configurable compaction instructions but not for user-message retention. #41358 (open) asks to keep the original user goal in the summary — again summarizer-mediated. #16512 and #16960 describe the same underlying pain. I believe this request is still distinct: it asks for deterministic (not summarizer-mediated) retention, plus a config surface for compaction instructions.