dsh-cwl
Run the following command in DeepSeek Harness:
dsh plugin install kalifun/dsh-cwl
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install kalifun/dsh-cwl in your DeepSeek Harness to install this plugin, available at https://github.com/kalifun/dsh-cwl
About this plugin
The slowest killer of long-horizon agents is context pressure. The standard fix—asking an LLM to summarize the history—has four structural flaws: the summarizer decides what matters rather than the task, causal chains collapse into prose, a full LLM call fires mid-task under token pressure, and compression under length constraints is a well-known hallucination trigger. dsh-cwl, grounded in the CWL paper (arXiv:2606.11213), takes a different path: no summarization at all. It infers the transcript into a typed episode graph—exploration nodes (pure reads/searches) linked by dependency edges to action nodes (side-effecting edits/writes)—then applies a fully deterministic, zero-LLM eviction policy in graduated levels. Large tool-result content in exploration episodes is stubbed first; completed action episodes whose effects are already persisted are evicted whole. User messages are never touched at any stage.
In practice, context pressure accumulated across dozens of tool calls in a single request or over many long conversation rounds can be released stably before every LLM call without breaking task structure. Eviction executes through the official surface-replace seam, original events remain in the log, and the agent can invoke cwl_recall at any time to re-read evicted content by file path. Offline cache-replay benchmarks show roughly a 24% reduction in cacheRead tokens after eviction, consistent across sessions and independent of eviction strategy.
Best suited for any DeepSeek Harness deployment where the context window is the bottleneck: multi-round long conversations, single-request autonomous tasks, or agent loops that keep accumulating tool calls. Zero configuration required—the plugin stays completely inert until context pressure exceeds its budget (default 80% of the model's context window), then activates automatically.
Use Cases
- Multi-round conversations where context window is gradually filling up
- Single-request autonomous tasks chaining dozens of tool calls
- Agent loops with ever-accumulating tool calls that risk OOM or hallucination drift
Best For
- Developers building long-horizon agents on DeepSeek Harness
- Teams hitting context window limits in production workloads
- Researchers exploring agent context strategies and token cost reduction
Related Plugins
Memory layer for coding agents that indexes local session history and auto-recalls relevant context before edits, commands, and failures, with no manual search needed.
Traceable, searchable cross-session memory for AI agents that turns conversation knowledge into a typed knowledge graph and recalls relevant subgraphs instead of replaying full history, natively integrated with DeepSeek Harness.
Gives DSH AI cross-session long-term memory, to-do and skill management, plus multi-session orchestration, external AI delegation, and an infinite canvas that grows with you.
dsh-mnemon is a three-tier, pluggable, Agent-driven memory system for DeepSeek Harness, combining Runtime memory, Project Documents, and replaceable Memory Spaces with nine long-term providers.