-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Description
Current /compact replaces entire context window with a brief summary.
It is often not desirable, besides obvious working context loss, AI assistant "personality" gets lost, and has to be whipped into order and fed nuances again.
Most of the context is consumed by tool calls, often unsuccessful or no longer relevant.
Offer a soft compaction operation. When activated:
1/ Mark tool calls with identifiers, clearly visible to the model. Leave most recent 10-15% of conversation by message count (will require tuning) unmarked.
2/ Offer model to return the list of identifiers to be deleted from the context, and produce a soft compaction message to preserve the context.
3/ Delete the tool calls with the identifiers the model selected.
4/ Insert the soft compaction message at the end of the conversation data.