Introduction

The built-in vision offloading default limit in DeepSeek Harness (DSH) is approximately 20MB or 600 images. Many OpenAI-compatible relay providers usually crash before that limit is reached. Every read_image call or pasted image remains in the conversation history and is re-sent in the next turn.

Plugin Introduction

dsh-image-amnesia is a DeepSeek Harness configuration package. Maintained by Choco-Zz, it is designed to preserve native vision capabilities (such as Grok, Claude, and GPT) while preventing historical images from being repeatedly uploaded to relay providers.

Core Features

  1. Preserve native vision: Ensures the current conversation can use vision models normally.
  2. Discard historical images: Drops older historical images before requests are sent to relay providers.
  3. Retain the latest images: Always keeps the most recent keepAtLeast image(s).
  4. Resource optimization: Reduces token usage and helps prevent relay provider crashes.
  5. Global coverage: All agents in the profile (including subagents and task board tasks) use this plugin.

Installation and Enablement

Install it once per profile to cover the entire configuration; no separate installation is needed for each agent.

# Web Profile
pnpm dsh plugin --profile web add github:Choco-Zz/dsh-image-amnesia

# Desktop Profile
pnpm dsh plugin --profile desktop add github:Choco-Zz/dsh-image-amnesia

# 本地检出
pnpm dsh plugin --profile web add "link:D:/CodexProjects/dsh-image-amnesia"

Configuration

After installing the plugin, you can adjust the retention policy by editing the configuration file.

Key Default Meaning
enabled true Master switch
maxImages 6 Number of images retained in outbound requests
maxBytes 6291456 Byte budget for retained images
keepAtLeast 1 Never discard the latest N image(s)

You can edit image-amnesia.maxImages in settings.yaml, or edit the package-bundled cordis.patch.yml.

Verification

Paste seven images in a single session. Check the host logs:

dsh-image-amnesia: dropped 1/7 image(s); kept 6

Notes

  1. Installation location: Install it once per profile; do not install it separately for each agent.
  2. Local storage: Local sessions still store all original images; only outbound requests are processed with the projection logic.
  3. dsh.client: Do not add a fake dsh.client component unless it is a real lazy-CJS client package (otherwise it may prevent DSH Desktop from starting).
  4. License: MIT License.

Conclusion

By dropping older images before outbound requests and retaining the latest images, this plugin effectively addresses relay provider crashes caused by too many images. It is well suited for DSH profiles that frequently use vision features.