Feature request
Add an option to automatically run a sweep/prune pass before model-triggered compress executions.
Motivation
Right now, DCP exposes compress as the model-facing context-management tool, while /dcp sweep [count] is only available as a manual slash command. This means there is no config-only way to say: "before automatic compression, first prune the last N tool calls/results."
For long agentic sessions, especially coding sessions with many tool outputs, it would be useful to aggressively remove stale tool noise before creating compression summaries. This could reduce summary verbosity and avoid spending compression effort summarizing low-value tool chatter that could simply be pruned.
Current behavior
- The model can autonomously call
compress.
- The user can manually run
/dcp sweep 100 and then /dcp compress.
- There does not appear to be a pre-compress hook or config option to automatically run sweep before automatic/model-triggered compression.
- Prompt overrides can encourage "general cleanup" compression, but they cannot invoke
/dcp sweep because sweep is not a model-facing tool.
Proposed behavior
Add a config option such as:
{
"compress": {
"preSweep": {
"enabled": true,
"count": 100
}
}
}
When enabled, every automatic/model-triggered compress call would first run the same pruning logic as /dcp sweep <count>, then continue with the normal compression flow.
Possible variants
A few possible designs:
compress.preSweep.enabled + compress.preSweep.count
compress.preHooks: [{ "type": "sweep", "count": 100 }]
- Expose
sweep as a model-facing tool, though this may be less desirable because it gives the model another destructive context-management action.
- Add a dedicated slash command like
/dcp sweep-compress 100, though this would not solve automatic compression unless also wired into the model-triggered compress path.
Why not just use prompt overrides?
The default system prompt says the only context-management tool available to the model is compress. So prompt overrides can only influence how/when compression happens; they cannot make the model execute /dcp sweep before compression.
Expected benefit
- Cleaner context before compression.
- Less verbose compression summaries.
- Fewer stale tool outputs preserved unnecessarily.
- Better behavior for reasoning-heavy or long-running coding sessions where tool-output buildup is the main source of context bloat.
Thanks for considering this.
Feature request
Add an option to automatically run a sweep/prune pass before model-triggered
compressexecutions.Motivation
Right now, DCP exposes
compressas the model-facing context-management tool, while/dcp sweep [count]is only available as a manual slash command. This means there is no config-only way to say: "before automatic compression, first prune the last N tool calls/results."For long agentic sessions, especially coding sessions with many tool outputs, it would be useful to aggressively remove stale tool noise before creating compression summaries. This could reduce summary verbosity and avoid spending compression effort summarizing low-value tool chatter that could simply be pruned.
Current behavior
compress./dcp sweep 100and then/dcp compress./dcp sweepbecausesweepis not a model-facing tool.Proposed behavior
Add a config option such as:
{ "compress": { "preSweep": { "enabled": true, "count": 100 } } }When enabled, every automatic/model-triggered
compresscall would first run the same pruning logic as/dcp sweep <count>, then continue with the normal compression flow.Possible variants
A few possible designs:
compress.preSweep.enabled+compress.preSweep.countcompress.preHooks: [{ "type": "sweep", "count": 100 }]sweepas a model-facing tool, though this may be less desirable because it gives the model another destructive context-management action./dcp sweep-compress 100, though this would not solve automatic compression unless also wired into the model-triggered compress path.Why not just use prompt overrides?
The default system prompt says the only context-management tool available to the model is
compress. So prompt overrides can only influence how/when compression happens; they cannot make the model execute/dcp sweepbefore compression.Expected benefit
Thanks for considering this.