AI Agent Hub
Back to plugins
🤖

dsh-codex-compaction

Model Inference Updated 2026.09.12

Run the following command in DeepSeek Harness:

dsh plugin install shaomingbo/dsh-codex-compaction

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

Run dsh plugin install shaomingbo/dsh-codex-compaction in the DeepSeek Harness terminal to install this plugin; source at https://github.com/shaomingbo/dsh-codex-compaction

About this plugin

In long openai-codex sessions, context-overflow compaction has always been handled exclusively by the official BasicCompactionEngine, leaving users without a way to switch strategies or reliably replay summaries in histories that mix text with image attachments. dsh-codex-compaction adds an opt-in, account-bound native compaction and replay seam per session without patching core code: toggle it with /codex-native on to let the native runtime produce the summary, switch back with off or inherit, and preferences survive host restarts while the default path stays untouched.

Beyond the toggle, the plugin repairs persistent replay of user and tool-result images through the host's durable attachment service so mixed histories survive compaction; splits request deadlines into three explicit budgets (setup, total, idle watchdog); ends SSE streams on a valid terminal event rather than waiting for HTTP EOF; and enforces at most one same-lease retry or text fallback per failure, with no lease renewal or stacked retries. It is honest about recall: semantic memory after compaction is lossy, so critical decisions and code references should live in project files.

It is aimed at developers who run long, multi-turn openai-codex sessions, want fine-grained control over when compaction triggers and what recall guarantees actually are, and whose conversations include image attachments. Note that the plugin requires a specific dsh CLI version paired with a matching account version, and the native channel is off by default — this is an on-demand capability layer, not a drop-in replacement.

Use Cases

  • Enable native compaction on demand in long openai-codex sessions
  • Recover readable summaries in mixed image and text histories
  • Control compaction request deadlines, retries, and fallback boundaries

Best For

  • Developers running multi-turn openai-codex sessions
  • Developers whose conversations include frequent image attachments
  • Engineering teams that need explicit compaction recall boundaries