mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-13 04:03:30 +00:00
# Conflicts: # .agents/notes/implemented/architecture/2026-06-14-session-persistence.i18n.yaml # .agents/notes/implemented/architecture/2026-06-14-session-persistence.md # .agents/notes/implemented/architecture/2026-06-14-session-persistence.zh.md # .agents/notes/implemented/architecture/2026-08-08-bounded-session-persistence-write-batching.i18n.yaml # .agents/notes/implemented/architecture/2026-08-08-bounded-session-persistence-write-batching.md # .agents/notes/implemented/architecture/2026-08-08-bounded-session-persistence-write-batching.zh.md # .agents/notes/implemented/feature/2026-08-10-web-session-log-export.i18n.yaml # .agents/notes/implemented/feature/2026-08-10-web-session-log-export.md # .agents/notes/implemented/feature/2026-08-10-web-session-log-export.zh.md # apps/cli/tests/profiles/headless/tests/session-format-guard.expected.e2e.ts # apps/web/tests/message-actions.e2e.ts # apps/web/tests/scaffold-generation.spec.ts # apps/web/tests/scaffold.ts # apps/web/tests/seeded-history.e2e.ts # apps/web/tests/subagent-conversation.e2e.ts # docs/config-catalog.i18n.yaml # docs/config-catalog.md # docs/config-catalog.zh.md # docs/event-producer-consumer.i18n.yaml # docs/event-producer-consumer.md # docs/event-producer-consumer.zh.md # docs/persistence-catalog.i18n.yaml # docs/persistence-catalog.md # docs/persistence-catalog.zh.md # docs/subsystems/persistence.i18n.yaml # docs/subsystems/persistence.md # docs/subsystems/persistence.zh.md # docs/subsystems/session.i18n.yaml # docs/subsystems/session.md # docs/subsystems/session.zh.md # packages/api/session-controller/tests/session-projections.host.spec.ts # packages/core/agent-loop/tests/resume.spec.ts # packages/session-query/session-query-sqlite/tests/sqlite.spec.ts # packages/session-query/session-query/tests/tracing.spec.ts # packages/session/session-persistence-jsonl/README.i18n.yaml # packages/session/session-persistence-jsonl/README.md # packages/session/session-persistence-jsonl/README.zh.md # packages/session/session-persistence-jsonl/src/index.ts # packages/session/session-persistence-jsonl/tests/jsonl.spec.ts # packages/session/session-persistence-jsonl/tests/zstd.spec.ts # packages/session/session-persistence/tests/contract.ts # packages/session/session-persistence/tests/coordinator-contract.ts # packages/session/session-persistence/tests/persistence.spec.ts # packages/subagent/subagent/src/continuation.ts # packages/subagent/subagent/tests/list-children.spec.ts
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, and oversized tool outputs can be trimmed first so there is less to condense. 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 |
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.