feat(session): add suffix compaction - #44264
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: Related PR:
This PR is related because it also deals with session compaction configuration and behavior, though it focuses on thresholds and continuous compaction prevention rather than the suffix compaction mode itself. The current PR #44264 (feat(session): add suffix compaction) appears to be the primary implementation of this feature, as it's the only one matching the specific "suffix compaction" functionality. No duplicate PRs found for the exact suffix compaction feature being implemented in PR #44264. |
This diff is very large (36 files, +2594/−282), so automated line-by-line review is skipped here — recommending human review for this one. |
Issue for this PR
N/A
Type of change
What does this PR do?
Adds experimental
compaction.mode: "suffix"support to both session runtimes while keeping prepend as the default. Suffix compaction reuses the provider-bound request prefix, appends a bounded summary instruction, disables tool execution, and falls back once to prepend when the request is unsafe or the summary is invalid.It also persists requested/used mode, fallback reason, duration, and token diagnostics, then shows them on the TUI compaction divider. Replacement plugin prompts retain their existing prepend semantics.
How did you verify your code works?
bun run typecheckBroader suites are not clean in this checkout: Core has two unrelated
MoveSessiongit-apply failures; OpenCode has unrelated file-mode and response-timeout failures and exceeded the five-minute run limit.Screenshots / recordings
Not included; the UI change is a text-only TUI diagnostic line.
Checklist