AI Agent Hub
Back to plugins
🧠

dsh-codex-context

Memory Updated 2026.09.07

Run the following command in DeepSeek Harness:

dsh plugin install dvaJi/dsh-codex-context

Paste the following prompt into your AI chat to install this plugin:

To install this plugin in DeepSeek Harness, the source repository is https://github.com/dvaJi/dsh-codex-context ; run dsh plugin install dvaJi/dsh-codex-context to mount it.

About this plugin

The biggest practical pain in long coding-agent sessions is not model quality but context-window exhaustion: once the window fills, the default LLM-summarizing compaction permanently destroys exact error messages, raw command outputs, and code signatures. dsh-codex-context replaces that lossy backend with a token-budgeted sliding window that walks backwards, shadows the oldest nodes until the retained tail fits the budget, and never separates a tool call from its result. Routine windowing writes a tiny template checkpoint at near-zero model cost; only when pressure crosses the emergency threshold does the engine call the model for a structured summary, degrading gracefully to the template if that call fails.

On the retrieval side, two tools are exposed to the model. update_notes pins persistent working notes—goals, modified files, constraints, next steps—at the top of every subsequent request, surviving windowing, compaction, and even restarts. search_history performs regex or keyword search across the entire append-only session log, with cold (shadowed) history searched first and excerpts centered on the match position. Information that leaves the active window is never truly gone; it simply moves from in-context to retrievable on demand.

This plugin suits developers running long DeepSeek Harness coding sessions where exact error reproduction and code integrity matter, as well as architects experimenting with the Codex 0.153 context-management pattern who want to swap the compaction backend from lossy summarization to lossless windowing plus on-demand retrieval without touching the existing /compact command or tool-result pruner.

Use Cases

  • Long coding sessions where the context window fills repeatedly and early precise outputs keep being lost
  • Needing exact recall of early error strings or raw tool outputs without re-running commands
  • Replacing lossy summarization compaction while preserving dsh's existing /compact and tool-pruner pipeline

Best For

  • Developers running long DeepSeek Harness coding sessions
  • Technical teams with strict requirements for exact error reproduction and code integrity
  • dsh plugin developers exploring Codex context-management patterns