AI Agent Hub
Back to plugins
🧠

dsh-cache-stabilizer

Memory Updated 2026.08.15

Run the following command in DeepSeek Harness:

dsh plugin install dongsheng123132/dsh-cache-stabilizer

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

Run dsh plugin install dongsheng123132/dsh-cache-stabilizer in your DeepSeek Harness terminal (source: https://github.com/dongsheng123132/dsh-cache-stabilizer) to install the plugin.

About this plugin

The DeepSeek provider-side prompt cache only triggers on an exact prefix match starting from token zero, yet the default DSH behavior bakes the working directory into the persona sentence of the system prompt. Every time you switch projects the prefix changes, the cache misses, and you pay again for tokens you have already sent. dsh-cache-stabilizer exists to remove that friction.

The plugin makes two semantics-preserving changes. First, it relocates the working directory out of the known default persona sentence and into the runtime-context snapshot, so different projects can share the same system-prompt prefix while each request still receives the correct cwd. Second, it canonicalizes the object-key order inside tool schemas, eliminating another source of non-deterministic noise in the cacheable prefix. On top of that, a human-only /cache command lets you read the actual provider cacheReadTokens, uncached inputTokens, and cache-write tokens, so you can verify cache behavior at a glance instead of guessing.

If you run multiple projects through DSH and want to cut down on repeated DeepSeek billing, this plugin is worth a try. Its safety boundary is tight: only the exact sentence used by the standard headless coding persona is relocated; a custom persona that mentions {{cwd}} in another form is left untouched. The plugin does not freeze tool catalogs, reuse stale context, proxy model responses, or implement a second cache.

Use Cases

  • Switching between multiple projects in DSH while reusing the same system-prompt prefix to reduce token costs.
  • Verifying whether the DeepSeek provider prompt cache is actually being hit.
  • Running headless coding workflows where a stable cache prefix avoids invalidation caused by working-directory changes.

Best For

  • Developers using DSH with DeepSeek who run multiple project workflows.
  • Solo developers or small teams watching API bills and wanting to cut redundant token costs.
  • Engineering teams running headless or automated coding pipelines who want to lower inference spend.