Skip to content

[FEATURE]:Session compaction includes already-summarized messages, wasting tokens #12479

@Liuhanlin23

Description

@Liuhanlin23

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description:
The session compaction logic in compaction.ts currently includes all historical messages every time it performs compaction, even when previous compaction summaries already exist. This causes unnecessary processing and token waste.
I noticed that the prune() method already implements this optimization, recognizing that messages before a summary point don't need reprocessing.
If you agree this optimization is needed, I would like to be assigned to handle and fix this issue.

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions