Context window occupancy is a common issue when developing agents using DSH’s plan mode. Standard context compaction operations often struggle to take effect during the plan approval stage, or they may obscure the plan body itself. This plugin adds a “Compact & Execute” option to the approval card, allowing for context compaction before the plan is approved, while preserving the plan body and unfinished tool batches.
dsh-plan-compact-execute is a workflow plugin maintained by SpookyWaste, designed to address context management issues in plan mode.
Core Features¶
- Adds a “Compact & Execute” button to the title row of the approval card.
- Displays current context usage via a concentric ring icon on the left side of the button (hover to view specific values).
- Compacts the context prior to plan submission into a summary first.
- Preserves the plan body, original approval text, and unfinished tool batches verbatim.
- During compaction, the entire review card is replaced by a progress card to prevent secondary decisions from landing in the middle of the host’s history rewriting process.
Installation & Activation¶
Install via CLI:
dsh plugin --profile web add dsh-plan-compact-execute
Or add it via the web/desktop plugin management panel (enter the plugin name dsh-plan-compact-execute or the repository URL).
Environment Requirements¶
- Node.js: 24 (Test suite minimum 22.15)
- DSH Version:
0.1.7-rc.2or0.2.0-rc.2
Typical Usage¶
Click “Compact & Execute” on the approval card in plan mode. The plugin will first compact the history prior to the plan submission within that session into a summary. It then answers the pending question using the approval tag provided by the issue itself. Plan mode exits immediately, and the model begins execution with the verbatim plan preserved.
Technical Details & Notes¶
- The compaction scope only includes the exploration history preceding the pending tool batch; the plan body and similar content will not be compacted.
- The host-side component is a loaded JS artifact; changes require a gateway restart.
- The client bundle is monitored by
dsh-client-modulesand will hot-swap automatically.
This plugin resolves context overflow issues in plan mode by compacting history while retaining plan content. Please review the source code and license before installation.