You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,14 @@ DCP reduces context size through a compress tool and automatic cleanup. Your ses
28
28
29
29
### Compress
30
30
31
-
Compress is a tool exposed to your model that selects a conversation range and replaces it with a technical summary. You can think of this as a much smarter version of Opencode's compaction process. Instead of triggering statically when your session reaches its maximum context and on the entire coding session, Compress allows the model to pick when to activate based on task completion, and to only compress a subset of messages containing the completed task. This allows the summaries replacing the session content to be much more focused and precise than Opencode's native compaction.
31
+
Compress is a tool exposed to your model that replaces closed, stale conversation content with high-fidelity technical summaries. You can think of this as a much smarter version of Opencode's compaction process. Instead of triggering statically when your session reaches its maximum context and on the entire coding session, Compress allows the model to pick when to activate based on task completion, and to only compress the specific messages that are no longer needed verbatim.
32
32
33
-
When a new compression overlaps an earlier one, the earlier summary is nested inside the new one — so information is preserved through layers of compression rather than diluted away. Additionally, protected tool outputs (such as subagents and skills) and protected file patterns are always kept in compression summaries, ensuring that the most important information is never lost. You can also enable `protectUserMessages` to preserve your messages verbatim during compression, though note that large prompts (e.g. copy-pasting log files in the prompt) will then never be compressed away.
33
+
DCP supports two compression modes:
34
+
35
+
-`range` mode compresses a contiguous span of conversation into one or more reusable block summaries.
36
+
-`message` mode is experimental and compresses individual raw messages independently, letting the model manage context much more surgically around closed work.
37
+
38
+
In `range` mode, when a new compression overlaps an earlier one, the earlier summary is nested inside the new one so information is preserved through layers of compression rather than diluted away. In both modes, protected tool outputs (such as subagents and skills) and protected file patterns are kept in compression summaries, ensuring that the most important information is never lost. You can also enable `protectUserMessages` to preserve your messages verbatim during compression, though note that large prompts (e.g. copy-pasting log files in the prompt) will then never be compressed away.
34
39
35
40
### Deduplication
36
41
@@ -99,6 +104,9 @@ Each level overrides the previous, so project settings take priority over global
99
104
"protectedFilePatterns": [],
100
105
// Unified context compression tool and behavior settings
101
106
"compress": {
107
+
// Compression mode: "range" (compress spans into block summaries)
108
+
// or experimental "message" (compress individual raw messages)
109
+
"mode":"range",
102
110
// Permission mode: "allow" (no prompt), "ask" (prompt), "deny" (tool not registered)
103
111
"permission":"allow",
104
112
// Show compression content in a chat notification
@@ -133,8 +141,6 @@ Each level overrides the previous, so project settings take priority over global
133
141
// Controls how likely compression is after user messages
134
142
// ("strong" = more likely, "soft" = less likely)
135
143
"nudgeForce":"soft",
136
-
// Flat tool schema: improves tool call reliability but uglier in the TUI
137
-
"flatSchema":false,
138
144
// Tool names whose completed outputs are appended to the compression
139
145
"protectedTools": [],
140
146
// Preserve your messages during compression.
@@ -149,10 +155,6 @@ Each level overrides the previous, so project settings take priority over global
149
155
// Additional tools to protect from pruning
150
156
"protectedTools": [],
151
157
},
152
-
// Prune write tool inputs when the file has been subsequently read
153
-
"supersedeWrites": {
154
-
"enabled":true,
155
-
},
156
158
// Prune tool inputs for errored tools after X turns
157
159
"purgeErrors": {
158
160
"enabled":true,
@@ -176,16 +178,17 @@ DCP provides a `/dcp` slash command:
176
178
-`/dcp stats` — Shows cumulative pruning statistics across all sessions.
177
179
-`/dcp sweep` — Prunes all tools since the last user message. Accepts an optional count: `/dcp sweep 10` prunes the last 10 tools. Respects `commands.protectedTools`.
178
180
-`/dcp manual [on|off]` — Toggle manual mode or set explicit state. When on, the AI will not autonomously use context management tools.
179
-
-`/dcp compress [focus]` — Trigger a single compress tool execution. Optional focus text directs what range to compress.
181
+
-`/dcp compress [focus]` — Trigger a single compress tool execution. Optional focus text directs what content to compress, following the active `compress.mode`.
180
182
-`/dcp decompress <n>` — Restore a specific active compression by ID (for example `/dcp decompress 2`). Running without an argument shows available compression IDs, token sizes, and topics.
181
183
-`/dcp recompress <n>` — Re-apply a user-decompressed compression by ID (for example `/dcp recompress 2`). Running without an argument shows recompressible IDs, token sizes, and topics.
182
184
183
185
### Prompt Overrides
184
186
185
-
DCP exposes five editable prompts:
187
+
DCP exposes six editable prompts:
186
188
187
189
-`system`
188
-
-`compress`
190
+
-`compress-range`
191
+
-`compress-message`
189
192
-`context-limit-nudge`
190
193
-`turn-nudge`
191
194
-`iteration-nudge`
@@ -199,16 +202,16 @@ To customize behavior, add a file with the same name under an overrides director
199
202
To reset an override, delete the matching file from your overrides directory.
200
203
201
204
> [!NOTE]
202
-
> `compress` prompt changes apply after plugin restart because tool descriptions are registered at startup.
205
+
> `compress-range` and `compress-message` prompt changes apply after plugin restart because tool descriptions are registered at startup.
203
206
204
207
### Protected Tools
205
208
206
209
By default, these tools are always protected from pruning:
The `protectedTools` arrays in `commands` and `strategies` add to this default list.
210
213
211
-
For the `compress` tool, `compress.protectedTools` ensures specific tool outputs are appended to the compressed summary. It defaults to an empty array `[]` but always inherently protects`task`, `skill`, `todowrite`, and `todoread`.
214
+
For the `compress` tool, `compress.protectedTools` ensures specific tool outputs are appended to the compressed summary. By default it includes`task`, `skill`, `todowrite`, and `todoread`.
0 commit comments