Add manual compaction support #2148
felixarntz
started this conversation in
Protocol Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
ACP v2 can report that compaction happened, but it does not provide a standard way for a Client to request compaction. This leaves clients without a portable way to compact a long-running session before starting another turn or when approaching a context limit.
Clients need a portable way to request compaction, provide optional instructions for the summary, and observe when the operation completes. A standard ACP method would let Clients offer the same control across Agents.
Proposed shape
Add an optional, capability-gated
session/compactmethod:{ "sessionId": "sess_123", "instructions": "Preserve the decisions, unresolved errors, and file paths needed for the next turn." }The Agent would advertise support through the existing v2 capability tree. The request could return once compaction is accepted, with completion and failure reported through
session/update. The update should identify the compaction boundary and remain associated with the same session so Clients can update their local history and continue normally.Optional instructions should guide the summary without changing the session's user-visible conversation. The protocol should define whether compaction is permitted only between turns or may interrupt an active turn, and how a Client observes completion before sending the next prompt.
Open questions
session/compactbe rejected while a turn is active, or should it queue until a safe boundary?Harness support
All lists are non-comprehensive and just samples of the ecosystem.
Support for manual compaction:
No support for manual compaction:
Related discussion
#871 discusses exposing compaction summaries and boundaries so ACP-only Clients can persist resumable context. This proposal complements that work by defining how a Client asks an Agent to perform compaction in the first place.
Looking for
Feedback on the method name, capability shape, instruction semantics, and lifecycle events. If this direction fits ACP v2, we can draft an RFD and test it against multiple ACP harnesses.
All reactions