Merge master 62b700bba7bb71e66d2d5a3b850ba8f4dd0fd6b4 into release/session-log-v4 at 4825bc01a999f564e79172a6af28e34fc757c540. Preserve this pinned integration checkpoint before any later upstream movement so the dependent session-format repairs have an immutable rebase base. Keep release projection-backed child catalogs, independent Session references, exact fork behavior, V4 writer, and existing migration data. Adapt the incoming subagent sidebar chat to refreshProjections rather than the removed dedicated catalog API, preserve title projections in complete projection fixtures, and retain both sidebar actions and release lineage/status behavior. Remove the duplicate SessionProjectionMap import introduced by automatic merging. Preserve both disjoint archive seals without changing any existing hash. Regenerate current Cordis and documentation catalogs from the combined source, retaining release session methods plus master slot factories. The frozen V0-V3 runtime paths are unchanged. Initial validation passed the full build, 93 focused Client tests, and all 1905 archived artifact seals; remaining integration and snapshot checks follow on this checkpoint.
description, kind
| description | kind |
|---|---|
| Package map for the conversation-condensing feature family: automatic compaction, the on-demand /compact command, and tool-output trimming. | package-group |
compaction/ — compaction capability family
English | 中文
Summary
The compaction/ group keeps long agent conversations working near the model's context limit: older history is condensed into a summary automatically as token pressure builds, on demand with /compact, oversized tool outputs can be trimmed first so there is less to condense, and images an image-capable route can no longer send are replaced with placeholders. The shipped dsh base enables the feature by default — mount the packages explicitly to tune when and how condensation happens. The token measurement that decides when to condense lives in a separate LLM-family service.
Table of Contents
Packages
Each package below provides one piece of the feature; open a package page for how to use it.
| Package | Role | ctx key |
|---|---|---|
compaction/ |
The shared condensation contract: the operations and summary format every backend and trigger use | ctx.compaction |
compaction-basic/ |
Automatic condensation of older history into a summary as token pressure builds | registers ctx.compaction |
compaction-tool-result-pruner/ |
Trims oversized tool outputs so less history needs condensing | ctx.toolResultPruner |
compaction-image-offload/ |
Replaces over-budget request images with placeholders when an image-capable route rejects a request | listens to agent/request-error |
command-compact/ |
The /compact command to condense history on demand |
registers on ctx.commands |
Related documentation
Start with the subsystem reference for the shared vocabulary, then read the two Agent Notes for the design rationale.
- Compaction subsystem reference — the condensation vocabulary, results, and service behavior.
- Compaction capability-seam Agent Note — how the family is split and why it depends on session and LLM vocabulary.
- Queued manual compaction Agent Note — how on-demand
/compactserializes against running turns. - Capability seams — the Service Definition / Service Provider / Consumer split this family follows.
Dev Note
Working context for maintainers — click to expand
None.