Preface

When troubleshooting a session in DSH, information is usually scattered across session logs, failed commands, and repository diffs. Posting the context directly might also leak credentials. dsh-repro handles this compromise: it reads the full canonical log from the current session, performs value-level cleaning on suspected credentials, collects failed commands and git diff, and finally writes it into a transferable, replayable issue bundle.

The following introduces the positioning of this plugin, installation methods, core behaviors, and known boundaries.

What is this

dsh-repro is a DeepSeek Harness plugin maintained by EvilIrving, licensed under MIT.

It provides a /repro command to export a minimalized, credential-cleaned, replayable issue bundle.

Core Features

Providing the /repro command

The plugin provides the following slash command:

/repro [output directory]

After running, the command returns a one-line success message indicating the path of the generated bundle. The bundle content is not injected into the model context.

Reading the current session log

It reads the full canonical log of the current session via sessionPersistence.inspect.

The events in the output are a continuous, complete log starting from seq 0, which can be replayed later via:

ctx.sessions.create(id, { seed })

Value-level cleaning of secrets

The default cleaning strategy is fail-closed: strings that look like credentials are redacted rather than passed through directly.

The cleaning rules cover three types of credential-shaped values:

  1. Object keys matched by key pattern.
  2. Strings starting with known token prefixes.
  3. High-entropy long strings.

Relevant default configuration items include:

minHighEntropyLength: 20
gitDiffMaxBytes: 256 KiB
gitGraceMs: 5000

Collecting failed commands and git diff

The plugin collects failed commands along with a git diff.

If subprocess is unavailable, or the current directory is not a git repository, the git diff falls back to an empty string.

Output manifest

The final filename written is:

repro-<sessionId>.json

It contains the cleaned full canonical log, failed commands, and git diff.

Installation and enabling

Install from GitHub:

dsh plugin --profile <name> add github:EvilIrving/dsh-repro

Install from a local checkout:

dsh plugin --profile <name> add ./dsh-repro

The <name> in the installation command is a placeholder for the profile name and needs to be replaced with the actual profile name.

The bundle patch inserts a line of plugin record (dsh-repro). It requires the commands and sessionPersistence services, which are already mounted in the base profile.

Typical usage

  1. Run in a DSH session where a problem occurs:
/repro [output directory]
  1. Check the returned one-line success message to get the bundle path.
  2. Pass the bundle as issue material; it contains organized canonical log, failed commands, and git diff.

If you need to reuse the session context, you can later use:

ctx.sessions.create(id, { seed })

to replay it. This is not a CLI command executed by /repro itself.

Applicable scenarios and notes

Suitable for scenarios where you need to compress DSH session issues into transferable materials while avoiding the leakage of plaintext credentials.

Notes:

  • commands and sessionPersistence are hard dependencies (inject).
  • subprocess is an optional dependency; when missing or cwd is not in a repository, git diff is an empty string.
  • v1 only performs export and does not include a replay CLI; dsh repro run <bundle> is a separate process-level seam, outside the scope of /repro.
  • v1’s bundle writing bypasses the sandboxed ctx.fs seam and directly uses node:fs/promises; routing to ctx.fs is deferred.
  • No oversized-artifact inlining; spilled artifacts are only referenced via locator, not file byte inlining.
  • DSH plugins run with the permissions of the current dsh process; please check the source code and license before installing. This project is licensed under MIT.

Conclusion

The value of dsh-repro lies in organizing the current session log, failed commands, and git diff into a credential-cleaned, replayable issue bundle.

GitHub repository: https://github.com/EvilIrving/dsh-repro