Introduction

When running long tasks with an AI coding agent, a common situation is: the task needs to be paused halfway, or the context needs to be handed over to another agent or developer. The standard handoff method is to simply dump the conversation log or work notes as-is. The receiver gets a descriptive text—relying on manual reorganization to figure out where the task stands, which decisions are confirmed, and which validations passed. Moreover, there is no way to confirm that the workspace is still in the same state as when the handoff occurred.

dsh-workstate solves exactly this problem. It captures the agent’s current work as a machine-readable state package. Before restoring, it validates whether the workspace still matches, and then injects the state. Below is an introduction to the plugin’s positioning, features, and usage.

What is it

dsh-workstate is a local-first plugin for DeepSeek Harness, authored by luoyuejun9, licensed under MIT, and currently at version 0.1.0.

It captures what the agent is doing: task status, progress, decisions, failures, validations, change paths, next actions, and a complete Git integrity fingerprint. The README explicitly states that it is not an export of conversation logs.

The core consists of four actions:

  • checkpoint: pause and save current work
  • transfer: create a shareable export for other agents or developers
  • resume: validate and inject an existing state package without ever changing Git state
  • diff: compare two checkpoints based on stable work-item IDs

Core Features

Commands

After installation, you can use the following slash commands:

/workstate checkpoint [note]
/workstate transfer [target]
/workstate list
/workstate inspect [id]
/workstate diff <from> <to>
/workstate validate [id]
/workstate resume [id]
/workstate resume [id] --allow-diverged

Tools provided to the model

In addition to slash commands, the plugin provides the model with the following tools: workstate_capture, workstate_list, workstate_read, workstate_diff, workstate_validate, workstate_resume. The model can call these tools at the appropriate time without relying entirely on manual command input.

Installation and Enablement

The plugin requires Node.js 22.19+ and DeepSeek Harness 0.1.0-rc.6. The installation command is targeted at the web profile:

dsh plugin --profile web add dsh-workstate

After installation, you also need to manually add the following insert to ~/.dsh/profiles/web/cordis.patch.yml (keep existing lines in the file):

- insert:
    - id: workstate
      name: dsh-workstate

Then restart DSH. If you are using a local source code checkout for temporary testing, you can point the equivalent patch to the locally installed package. After completing the steps above, the plugin will be active in the web profile.

Storage and Security Design

This section is the focus of the plugin. We will discuss storage first, then security boundaries.

The state package format is dsh.workstate/v1alpha1, stored in the .dsh/workstate/ directory. Checkpoint history is only saved locally and is gitignored; only transfer exports are intentionally designed to be tracked by Git.

State packages only contain paths and hashes, not file content or diffs; known credential patterns are rejected before persistence to avoid writing sensitive information into the state package.

Validation during resume compares the Git branch, commit, dirty state, and content fingerprints. When there is divergence, it defaults to fail closed, meaning it rejects the restore. If you confirm that the divergence is acceptable, use --allow-diverged to explicitly allow it.

Additionally, the plugin itself never executes checkout, reset, stash, stage, commit, or push. Changes to the Git state are always controlled by the user.

Typical Workflow

Combining the above capabilities, a typical handoff process is:

  1. The current agent executes /workstate checkpoint [note], saving the task status, progress, decisions, failures, validations, change paths, next actions, and the Git integrity fingerprint as a state package.

  2. Use /workstate list to view existing checkpoints, and /workstate inspect [id] to view details of a specific checkpoint.

  3. When handing over to another agent or developer, execute /workstate transfer [target] to generate a shareable export.

  4. The receiver executes /workstate resume [id]. Resume validates the Git branch, commit, dirty state, and content fingerprints before injecting the state package; it will fail and exit if there is divergence, using --allow-diverged to allow it if necessary.

  5. After recovery, if you want to compare two points in time, use /workstate diff <from> <to> to compare based on work-item IDs, or use /workstate validate [id] for validation.

Applicable Scenarios and Notes

Suitable scenarios:

  • Pausing a long task halfway and resuming it later by the same or another agent
  • Handing over work between an agent and a developer (in either direction)
  • Needing to perform a structured comparison between two points in time rather than relying on visually reading conversation logs

Notes:

  • The plugin runs with the permissions of the current dsh process. You should review the source code and license before installing.
  • The plugin version is 0.1.0, depending on DeepSeek Harness 0.1.0-rc.6; peerDependencies include @deepseek-ai/dsh-agent, dsh-commands, dsh-llm, dsh-tools (all at 0.1.0-rc.6) and @deepseek-ai/cordis 4.0.1. Pay attention to version matching during installation.
  • To participate in local development, clone the repository, run npm install, and then run npm run check to complete type checking, testing, and building.

Conclusion

dsh-workstate’s purpose is simple: to capture the agent’s work state into a structured, verifiable package, so that handoffs no longer rely on descriptive text and you don’t have to worry about the workspace quietly changing. For workflows requiring multi-agent collaboration or human-machine relay, this is a plugin worth trying.

  • Directory: https://www.skillhub.cn/plugins/luoyuejun9/dsh-workstate
  • GitHub: https://github.com/luoyuejun9/dsh-workstate

Please note that skillhub.cn is an independent community plugin directory site with no official affiliation to DeepSeek / Hypothesis. The concept of DSH is “Everything is a plugin,” and community plugins like dsh-workstate are an integral part of this ecosystem.