Skip to content

fix(session): improve session compaction#23870

Merged
nexxeln merged 3 commits intodevfrom
nxl/improve-session-compaction
Apr 22, 2026
Merged

fix(session): improve session compaction#23870
nexxeln merged 3 commits intodevfrom
nxl/improve-session-compaction

Conversation

@nexxeln
Copy link
Copy Markdown
Member

@nexxeln nexxeln commented Apr 22, 2026

summary

  • anchor compaction summaries with a stricter structured prompt and explicit previous-summary updates
  • retain split tails when oversized recent turns would otherwise force full summarization
  • add regression coverage for repeated compactions, split tails, and compaction pagination boundaries

testing

  • bun test test/session/compaction.test.ts test/session/message-v2.test.ts test/session/messages-pagination.test.ts
  • bun typecheck

@nexxeln nexxeln merged commit 85ec11d into dev Apr 22, 2026
10 checks passed
@nexxeln nexxeln deleted the nxl/improve-session-compaction branch April 22, 2026 15:07
sdeonvacation pushed a commit to sdeonvacation/opencode-x that referenced this pull request Apr 23, 2026
@spaceemotion
Copy link
Copy Markdown

spaceemotion commented Apr 23, 2026

I think this update/change broke compaction for me - the new limit on the compaction text means the AI gets cut off before it can finish properly and is loosing context. 2k chars for a long-running session that has tons of context from before seems way too low (it's usually the file infos that get stripped for me).

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.

2 participants