dsh-carryon
Discovered★ 4CarryOn context folding (arXiv:2610.18784) for DeepSeek Harness: keep what the agent established, not the whole transcript.
dsh-carryon
CarryOn context folding for DeepSeek Harness: long agent sessions keep what they established, not the whole transcript.
English · 简体中文
When a DeepSeek Harness (dsh) session grows long, dsh compacts it by summarizing old turns into free text. dsh-carryon replaces that step with CarryOn from Pack Light, CarryOn. Old turns are folded into small, versioned records of what the agent has established ("carriers") and an execution context: the task, open obligations and the next step. Each fold is validated before it is committed, and a rejected fold changes nothing.
https://github.com/user-attachments/assets/5f4a6889-5cf6-41a4-aff1-327a9d5d6b7b
CarryOn demo by the paper's authors. Also on the project page.

The CarryOn runtime, from the paper. In dsh-carryon, dsh decides when to fold and keeps the recent turns; the Grounder is not ported yet (details).
Configuration · How it works · Development · Benchmark · Troubleshooting · Releasing · Changelog
Highlights
- Drop-in backend. dsh-carryon replaces dsh's compaction in the terminal, headless, SDK and ACP profiles. dsh
keeps its trigger, its verbatim tail and its safety checks, and
/compactworks as before. - CarryOn mode in the Web UI. The plugin adds a mode next to Standard mode, so you can compare both in the same app.
- Validated folds. A fold that fails validation leaves the session untouched. Rescans then back off as in the paper. Close to the context limit, a failed fold falls back to dsh's own summary, so the session can go on.
- Resumable. Fold state is stored as readable JSON in the session log and restored on resume.
- Ported, not reinvented. The runtime is a TypeScript port of carrycode, checked case by case against its parity fixtures.
How it works
flowchart LR
A["Session reaches<br/>dsh's compaction threshold"] --> B["Tracker<br/>updates candidates"]
B -->|compile request| C["Compiler<br/>carrier edits +<br/>execution context"]
B -->|nothing to compile| R
C --> D{"Validator"}
D -->|valid| E["Commit: checkpoint<br/>replaces old turns"]
D -->|invalid| R["Rejected: session unchanged,<br/>next scan backs off"]
R -.->|context near the limit| F["Fallback:<br/>dsh's summary"]
The checkpoint holds every carrier and the execution context. dsh keeps the most recent turns verbatim after it. A fold costs one Tracker call, plus one Compiler call when the Tracker asks for compilation; dsh's own compaction makes one summary call. The engine, the state format and how this port differs from the paper are described in How it works.
Results reported in the paper
These results come from the paper (Lu, McAuley, Zhang, 2026), with Claude Opus 4.7 as the agent. dsh-carryon has not been benchmarked against them.

OSWorld 2.0. CarryOn improves both binary and partial scores of the same Claude Opus 4.7 agent while cutting cost per task by 35.9%. Figure from the paper's authors.

Context and cost over agent turns on OSWorld 2.0. The baseline's input context keeps growing past 200K tokens, while CarryOn's stays near 65K. Figure from the paper's authors.
On BrowseComp-Plus, the paper reports accuracy rising from 49.0% to 56.0% with 22.9% fewer tokens per task.
Quick start
You need dsh 0.2.2-alpha.3 (each dsh-carryon release supports
exactly one dsh release), Node.js 24.9 or later (dsh's own requirement), and pnpm on your PATH
(npm install -g pnpm), which dsh plugin calls.
Install the plugin into the profile you use. For the terminal UI:
npx @deepseek-ai/dsh@0.2.2-alpha.3 plugin --profile tui add dsh-carryon
For the Web UI:
npx @deepseek-ai/dsh@0.2.2-alpha.3 plugin --profile web add dsh-carryon
If dsh 0.2.2-alpha.3 is already installed globally, drop the npx @deepseek-ai/dsh@0.2.2-alpha.3 prefix, for example
dsh plugin --profile tui add dsh-carryon. The same goes for the commands below.
Restart dsh: npx @deepseek-ai/dsh@0.2.2-alpha.3 opens the terminal UI, and
npx @deepseek-ai/dsh@0.2.2-alpha.3 web serves the Web UI and prints its address. In the terminal UI, every compaction is now a CarryOn fold. In the Web UI, new sessions start in
CarryOn mode, which you can switch from the mode menu next to the chat box:
Check, update, remove
dsh plugin passes its arguments to pnpm in the profile's directory, so pnpm's commands work. Check that the plugin
is installed:
npx @deepseek-ai/dsh@0.2.2-alpha.3 plugin --profile tui list
In the Web UI it is also listed under Plugins → Installed plugins. Once the session is long enough to compact
(or after /compact), a fold's checkpoint appears where dsh shows a compaction summary, and its full state is under
Trajectory → Raw Output.
Update to the latest release for your dsh version:
npx @deepseek-ai/dsh@0.2.2-alpha.3 plugin --profile tui update dsh-carryon
Remove it:
npx @deepseek-ai/dsh@0.2.2-alpha.3 plugin --profile tui remove dsh-carryon
Use --profile web for the Web UI. Something not working? See Troubleshooting.
Configuration
The plugin's config row is carryon-compaction. It accepts dsh's own compaction keys (thresholdRatio,
retainTokens, …) and a few CarryOn keys. For example, put this in $DSH_HOME/profiles/tui/cordis.patch.yml to fold at
half of the context window and run the CarryOn roles on the cheaper deepseek-flash:
- id: carryon-compaction
config:
thresholdRatio: 0.5
runtimeProvider: deepseek-official
runtimeModel: deepseek-flash
dsh replaces a row's whole config with the patched one, so list all your keys together. See
Configuration for every key, the defaults, and the Web UI's limits.
Citation
dsh-carryon implements the method of this paper. If you use it in research, please cite the paper:
@misc{lu2026carryon,
title = {Pack Light, CarryOn: Building Object-Oriented Context for Long-Horizon Agents},
author = {Lu, Yuchen and McAuley, Julian and Zhang, Lei},
year = {2026},
eprint = {2610.18784},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2610.18784}
}
carrycode and dsh-carryon are independent reimplementations built from the paper. They are not affiliated with the paper's authors or with DeepSeek.
License
dsh-carryon's code is Apache-2.0. The demo video and the figures shown above belong to the paper's authors, who gave permission to show them here; they are not covered by that license.
Comments
Loading…
Similar plugins
by orangeofcarl0-sys
A contract-preserving context runtime for long-horizon agents on DeepSeek Harness
★ 6
MIT
TypeScript
Oct 19, 2026
dsh plugin --profile web add dsh-epistemic-foldby elementor-i
agentmemory for DeepSeek Harness (dsh): full memory_* tools, capture hooks, and context injection over the local REST server
★ 4
↓ 49/wk
MIT
TypeScript
Aug 17, 2026
dsh plugin --profile web add @elementor-i/dsh-agentmemoryby bigstyle777
arXiv preprint search tool for DeepSeek Harness agents — abstracts only, token-bounded
★ 0
TypeScript
Aug 19, 2026
dsh plugin --profile web add dsh-tool-arxivby ckanner
DeepSeek Harness plugin: a Codex delegation that can carry a model and a reasoning effort per call
★ 0
MIT
TypeScript
Oct 25, 2026
dsh plugin --profile web add dsh-subagent-codex-proby Iwwww
Codex-style folding for the DeepSeek Harness web transcript: a running turn keeps only its last few actions visible, folded behind one row that opens the whole turn.
★ 0
MIT
JavaScript
Sep 17, 2026
dsh plugin --profile web add dsh-reasoning-foldModel-driven context compaction for DeepSeek Harness. The agent decides when and what to compress, commits durable session-log replacements, and ships reversible tool-result compression with byte-exac
★ 0
dsh plugin --profile web add @internetnutzer/dsh-asc