AI Agent Hub
Back to plugins
🧠

dsh-session-s3

Memory Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install gengmao/dsh-session-s3

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

Run dsh plugin install gengmao/dsh-session-s3 in the terminal to install this plugin; the source is at https://github.com/gengmao/dsh-session-s3

About this plugin

DeepSeek Harness writes session history to a local JSONL file by default. That path has triggered a recurring class of corruption bugs caused by torn writes, missing fsync, and concurrent appenders. At least seven community-confirmed corruption discussions point to the same root cause, yet there is no structural fix. dsh-session-s3 moves the persistence backend to an S3-compatible object store and eliminates the bug class with two invariants: every write is an immutable JSONL fragment carrying a SHA-256 digest, and write ordering is coordinated through a compare-and-swap on a single manifest. A fragment is conditionally PUT with If-None-Match; the manifest is then conditionally PUT with If-Match. The successful conditional PUT on the manifest is the commit point. A fragment, once landed, is never mutated; a crash at worst leaves one harmless orphan object. Concurrent writers arbitrate on the same manifest via CAS, and the loser receives a StaleWriterError instead of a silent overwrite. No leases, heartbeats, or fencing are required.

The plugin also exposes a library-level createProvider (load / append / read / compact / close) for callers outside the DSH seam, and invalid configuration reports every problem in one pass rather than stopping at the first. AWS S3, Cloudflare R2, MinIO, and Tigris are all on the compatibility matrix; pointing at an S3 Express One Zone directory bucket pushes single PUT latency into single-digit milliseconds. Credentials flow through the AWS SDK default chain, so SSO, instance roles, and GitHub OIDC work out of the box without embedding static keys. This plugin suits multi-instance deployments, teams that want session data collected in an object store, and anyone who does not fully trust the durability of a local filesystem. Note 22 or higher is required, and the target store must genuinely honor If-Match and If-None-Match headers: if conditional PUT always returns 200, the store is unsafe for this plugin.

Use Cases

  • Multi-instance Harness deployments that centralize session history in S3 or R2
  • Recurring torn-write and concurrent-corruption bugs in local JSONL that need a structural fix
  • Multi-AZ setups where session data must survive in an object store while controlling write latency

Best For

  • Ops and dev teams running multi-instance Harness who need centralized session management
  • Users who distrust local-filesystem durability and want a swappable object-store backend
  • Developers on R2, MinIO, Tigris, or similar S3-compatible stores who need real CAS semantics