feat(session): add suffix compaction - #44264
hugojosefson wants to merge 4 commits into
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. |
38af03b to
ca14d0f
Compare
ca14d0f to
046b23d
Compare
Keep recoverable suffix errors internal until fallback finishes. Reserve output space for reasoning and summary text, and reject truncated summaries. Use measured input tokens when available and count reasoning in overflow checks. Clarify the summary instructions for previous summaries and planned work.
046b23d to
d18e9ce
Compare
Note
🤖 Prepared by GPT-6 Astra on behalf of hugojosefson
Issue for this PR
N/A
Type of change
What does this PR do?
Adds experimental
compaction.mode: "suffix"to both session runtimes. Prepend stays the default.Suffix compaction appends summary instructions to the captured request to keep cached prompt tokens. It blocks tool execution and falls back to prepend when necessary.
Safeguards:
The TUI shows compaction mode, fallback reason, timing, and token usage. A filesystem import cycle correction permits the compiled server to start model requests.
How did you verify your code works?
Validation:
Full lint reports an existing octal escape error in
packages/session-ui/src/v2/components/prompt-input/index.tsx:163.Screenshots / recordings
None.
Checklist