Introduction¶
In DeepSeek Harness (DSH) multi-tool calling scenarios, the model often needs to read, search, or try multiple schemes before providing a conclusion. These intermediate steps enter the context, causing the subsequent turns to carry a lot of noise.
@dpskh/tool-checkpoint addresses one link: recording a persistent exploration start marker before exploration begins. This plugin does not fold content by itself; the marker remains inert until rewind. Subsequently, @dpskh/tool-rewind consumes this marker to fold the intermediate steps after the marker.
What is this¶
@dpskh/tool-checkpoint is a checkpoint marker plugin for DeepSeek Harness (DSH), maintained by dpskh, licensed under MIT.
After mounting, it provides two things:
ctx.checkpoint: A plugin service used to persistently record checkpoint marks by session ID in the plugin’s own storage domain.checkpoint: A model-callable tool provided for the model to invoke before starting exploration.
The positioning of this plugin is to record “where exploration starts”; it is not responsible for folding the context. The folding work is done by @dpskh/tool-rewind.
Core Features¶
Persistently Recording Checkpoint Mark¶
The mark is saved in the checkpoint storage domain at the path:
~/.dsh/storages/checkpoint.json
This mark is not a session event, does not enter the model’s visible history, and does not enter the durable session log.
Providing a Model-Callable Checkpoint Tool¶
The checkpoint tool accepts optional input:
{
"objective": "string"
}
After calling, it returns:
{
"id": "string",
"logLength": 0
}
Where:
id: The plugin’s own monotonic identity for the mark.logLength: The length of the session log at the time of marking.
For Rewind to Consume¶
The plugin provides the following interfaces for @dpskh/tool-rewind to use:
latestMark
hasActive
completeFold
These interfaces are used to read the latest mark, determine if there are still marks waiting to be folded, and mark the marker as completed after successful folding.
KV Cache Behavior¶
The README states that the KV cache effect of this plugin is prefix-stable: the tool schema is fixed, the mark is a storage record rather than a session event, and it will not change the request prefix.
Enable and Configure¶
No official installation command is provided in the verified materials, so no installation command is provided here.
Enabling it involves mounting this plugin in the DSH plugin configuration:
- id: tool-checkpoint
name: '@dpskh/tool-checkpoint'
config:
toolName: checkpoint
Where:
id: Plugin configuration item ID.name: Plugin package name, fixed to@dpskh/tool-checkpoint.config.toolName: The tool name visible to the model, defaulting tocheckpoint.
Using with @dpskh/tool-rewind¶
When used alone, the checkpoint only records an inert marker; the exploration content will still remain in the context.
When used alone, rewind will fail with a no-checkpoint error due to no consumable checkpoint.
Therefore, it is necessary to mount both plugins simultaneously:
- id: tool-checkpoint
name: '@dpskh/tool-checkpoint'
- id: tool-rewind
name: '@dpskh/tool-rewind'
config:
reportLanguage: en
Where reportLanguage is a configuration item for tool-rewind, set to en in the example.
Programming Contract¶
The plugin service interface is:
ctx.checkpoint.mark(session, objective?)
After calling, it returns:
{ id, logLength }
Meaning:
session: Current session identifier.objective?: Optional objective description.id: The plugin’s internal identity for this mark.logLength: The length of the session log at the time of marking, which can serve as a subsequent folding anchor.
Model Workflow¶
The model can use the following sequence:
- Before a survey requiring more than one tool call, call the
checkpointtool.
{
"objective": "optional description"
}
- Receive the result:
{
"id": "string",
"logLength": 0
}
- After completing the survey, call
rewindbefore ending the turn to fold the intermediate steps after the marker.
The key to this flow is: checkpoint is only responsible for marking, and rewind is responsible for folding.
Applicable Scenarios and Notes¶
Suitable for the following DSH workflows:
- Surveys requiring multiple tool calls beforehand.
- Wanting to fold the exploration intermediate steps out of the model’s visible context.
- Scenarios needing to retain a durable session log while reducing the overhead of intermediate processes.
Points to note:
- A marker without rewind is inert. Exploration will still remain in the context and will not automatically disappear just because a mark was placed.
- Each marker can only be folded once. Attempting to fold the same marker repeatedly will be rejected as an empty area.
- The mark does not belong to a session event. It does not enter the model’s visible history nor the durable session log.
- The durable session log keeps core-vocabulary to avoid introducing plugin events outside the repository that the harness cannot recognize.
- The plugin runs with the permissions of the current DSH process. You should check the source code, dependencies, and license before installation.
Links¶
Directory page:
https://www.skillhub.cn/plugins/dpskh/dsh-checkpoint
GitHub:
https://github.com/dpskh/dsh-checkpoint