AI Agent Hub
Back to plugins
🖥️

dsh-x-opencode-session

Client Updated 2026.09.14

Run the following command in DeepSeek Harness:

dsh plugin install Coco-king/dsh-x-opencode-session

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

Install the plugin in DeepSeek Harness by running dsh plugin install Coco-king/dsh-x-opencode-session; the source is available at https://github.com/Coco-king/dsh-x-opencode-session .

About this plugin

When you route model calls through an opencode.ai gateway such as OpenCode Go or Zen, the server relies on the x-opencode-session request header to identify and correlate conversations. Managing that header by hand is tedious and error-prone: the value must stay consistent across all requests within a single conversation, differ between conversations, and survive network drops, service restarts, and resumed chats without any intervention.

This plugin eliminates the configuration burden entirely. It reuses the conversation's own persistent session identifier, introducing no extra id, mapping table, or runtime state. Every model request within the same conversation carries the same value, and that value persists through disconnections, restarts, and continued sessions; different conversations naturally produce different values. The scope is also precise: only model-bound requests destined for opencode.ai receive the header, leaving other providers and side-channel traffic completely untouched.

If you are running DeepSeek Harness with OpenCode Go or Zen as the model backend and would rather not write middleware to manage session headers yourself, install this plugin and refresh the page. Everything else works exactly as before, with no additional setup or ongoing maintenance required.

Use Cases

  • Routing model calls via OpenCode Go or Zen gateway that requires server-side session correlation
  • Keeping session identity consistent across concurrent conversations, network drops, and service restarts
  • Avoiding custom middleware to manually manage the x-opencode-session request header

Best For

  • DeepSeek Harness users routing model calls through OpenCode Go or Zen gateways
  • Developers needing isolated multi-conversation sessions persisting across restarts
  • Users who prefer zero-config, zero-state plug-and-play solutions