Hanochhu/dsh-context-offload ↗★ 0
dsh-context-offload
Context offloading for DeepSeek Harness: consumed tool calls and their results are replaced in the model-visible history by a short stub, while the originals stay in the session log for replay. A between-step policy releases the accumulated backlog in batches, and an offload_context tool lets the model unload what it has finished with. 适合长对话中需要精简上下文、节省Token并防止超出限制的任务。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Hanochhu/dsh-context-offloadREADME
Read the full README ↗Configuration
All fields are optional.
| Field | Default | Meaning |
|---|---|---|
enabled | true | Set false to keep only the model-facing tool. |
retainUnits | 8 | Most recent complete tool units kept verbatim. Counted in units, not steps — step restarts at 1 for every turn, so a step delta across a turn boundary is meaningless. |
minUnitChars | 4000 | A unit smaller than this many text characters is not worth a replacement. |
flushChars | 20000 | Do not break the request prefix for less than this much releasable backlog. |
flushEverySteps | 10 | At most one automatic flush per this many steps. |
maxUnitsPerFlush | 40 | Upper bound on replacements appended in a single flush. |