mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 18:02:11 +00:00
Simplify compaction: remove proactive abort, use Agent.continue() for retry
- Add agentLoopContinue() to pi-ai for resuming from existing context - Add Agent.continue() method and transport.continue() interface - Simplify AgentSession compaction to two cases: overflow (auto-retry) and threshold (no retry) - Remove proactive mid-turn compaction abort - Merge turn prefix summary into main summary - Add isCompacting property to AgentSession and RPC state - Block input during compaction in interactive mode - Show compaction count on session resume - Rename RPC.md to rpc.md for consistency Related to #128
This commit is contained in:
parent
d67c69c6e9
commit
5a9d844f9a
27 changed files with 1261 additions and 1011 deletions
|
|
@ -2,6 +2,26 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- **Simplified compaction flow**: Removed proactive compaction (aborting mid-turn when threshold approached). Compaction now triggers in two cases only: (1) overflow error from LLM, which compacts and auto-retries, or (2) threshold crossed after a successful turn, which compacts without retry.
|
||||
|
||||
- **Compaction retry uses `Agent.continue()`**: Auto-retry after overflow now uses the new `continue()` API instead of re-sending the user message, preserving exact context state.
|
||||
|
||||
- **Merged turn prefix summary**: When a turn is split during compaction, the turn prefix summary is now merged into the main history summary instead of being stored separately.
|
||||
|
||||
### Added
|
||||
|
||||
- **`isCompacting` property on AgentSession**: Check if auto-compaction is currently running.
|
||||
|
||||
- **Session compaction indicator**: When resuming a compacted session, displays "Session compacted N times" status message.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Block input during compaction**: User input is now blocked while auto-compaction is running to prevent race conditions.
|
||||
|
||||
- **Skip error messages in usage calculation**: Context size estimation now skips both aborted and error messages, as neither have valid usage data.
|
||||
|
||||
## [0.16.0] - 2025-12-09
|
||||
|
||||
### Breaking Changes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue