Preface¶
DeepSeek Harness (dsh) packages models, tools, sessions, sandboxes and interfaces all as plugins. The official repository’s slogan is Everything is a Plugin. After switching to this runtime, the bottleneck is no longer installing plugins, but scattered historical conversations: pi’s JSONL files, OpenCode’s SQLite database, and the session directories of Codex and Claude Code. These files can be opened in their original tools, but cannot be directly used as dsh sessions to continue chatting.
dsh-import-agents reads sessions, chat histories and agent configurations from these four sources into DeepSeek Harness: the import results appear in the session list, and you can continue chatting with the full context intact; pi / OpenCode agents and system prompts will become discoverable dsh skills. There is a one-click Sync button in the composer toolbar of the web interface, and you can also use slash commands; when starting a new top-level session, if there are unimported histories, the plugin will ask if you want to migrate them.
This article is compiled after cross-checking the community plugin directory page, GitHub repository README (both Chinese and English), package.json, CHANGELOG, LICENSE and npm page. The community directory deepseek-harness-plugin.com is an independent site and has no official affiliation with DeepSeek / HuanTeng. Do not treat it as an official app store.
What is this¶
dsh-import-agents is a Session & Message type DeepSeek Harness plugin maintained by Chang-Tong, with the GitHub repository at Chang-Tong/dsh-import-agents. Its license is MIT (Copyright 2026 dsh-import-pi-opencode contributors). The npm package name is also dsh-import-agents, and the current version is 0.2.6 (released on 2026-08-17). The main language is JavaScript, and the runtime requirement is Node.js ≥ 22.19 (the repository states this matches dsh’s requirements, requiring node:sqlite and zstd from node:zlib). The client injection declaration in package.json specifies "platform": "web", and the sync button is targeted at the dsh web interface.
It solves a specific problem: converting the historical sessions of pi, opencode, codex and claude-code into resumable dsh sessions, and converting pi’s agents / system prompts and opencode’s agents into skill packs under $DSH_AGENTS_HOME/skills. Imports are mounted to the corresponding workspace based on the source cwd, and the titles carry source tags ([pi], [opencode], [codex], etc.). Duplicate imports are idempotent: stable IDs start with pi- / oc- / codex- / claude-, and existing entries will be skipped.
The GitHub repository page showed 10 stars at the time of the author’s check; the community directory page marked 6 stars at that time. Star counts are based on the repository page, as the directory numbers may lag behind. The directory page was收录 on 2026-08-06.
Core Features¶
Only the functions documented on the directory page and repository README that can be reproduced according to the documentation are listed below.
Four sources, converted into resumable dsh sessions¶
Each source corresponds to a default data root and a slash command. The storage locations are subject to the repository documentation:
| Source | Default Location | Command |
|---|---|---|
| pi | JSONL files under ~/.pi/agent/sessions |
/import-pi |
| opencode | ~/.local/share/opencode/opencode.db |
/import-opencode |
| codex | JSONL files under ~/.codex/sessions |
/import-codex |
| claude-code | JSONL files under ~/.claude/projects |
/import-claude-code |
Importing does not mean pasting text into the current dialog box, but writing JSONL events consistent with dsh’s persistent backend (zstd frames with checksums, project directory encoding). The repository notes that dsh’s built-in list / load / prepare commands can read back the original format. After opening the imported session, text, reasoning blocks and tool calls are all present, and the model will receive the complete history to continue the conversation.
Tool calls will be written as tool-call content blocks, paired with tool/call + tool/result events, and the Trajectory tab can render tool cards. The FAQ states that most source formats usually only save calls, not tool results. Imports use placeholder tool/result to make the request valid when resuming the session. Use --tools-as-text to switch to plain text (without trajectory cards), and --no-tools to discard tool calls entirely. Mechanical records (such as step-start, patch, compaction, etc.) will be skipped.
One-click Sync, slash commands, migration prompt for new sessions¶
There is a small button in the composer toolbar (Sync for English interface, 同步 for Chinese interface). Clicking it will execute /import-all, and the results will be displayed inline. /import-all will run imports for all four sources plus agents. You can also import a single source separately.
When starting a new top-level session, if there is unimported history for that project, the plugin will ask if you want to migrate. The decision is remembered per project, and the global agent decision is also remembered, with the status written to $DSH_HOME/import-pi-opencode-state.json. This only triggers for brand new top-level sessions with a cwd, not for subagents; environments without a UI provider such as headless mode will skip this silently. You can turn off the prompt with config: { offerOnStart: false }.
Agents become skills, sessions mounted to workspaces¶
/import-agents converts pi’s agents / system prompts and opencode’s agents into $DSH_AGENTS_HOME/skills/<name>/SKILL.md (default path ~/.agents/skills/), with metadata.source / metadata.kind recorded in the frontmatter. Name conflicts will be resolved to <name>-<source> (the documentation gives an example k3-reviewer-opencode); existing bundles will only supplement the SKILL.md file, and will skip if the name and content are identical.
Imported sessions are mounted to matching workspaces based on the original cwd, and created if they do not exist. Old imports can use /attach-workspaces to remount workspaces. Sessions without a cwd will be skipped when mounting workspaces instead of failing (CHANGELOG 0.2.2).
Installation and Activation¶
The installation command given on the community directory page, run in the DeepSeek Harness terminal:
dsh plugin add github:Chang-Tong/dsh-import-agents
For reproducible installations, fix the commit hash according to the directory page instructions:
dsh plugin add github:Chang-Tong/dsh-import-agents#<commit>
The repository README recommends installing via the npm package and specifying the web profile (starting from 0.2.4, dsh.bundle is declared, and one-click installation will automatically activate the bundle without manually modifying cordis.patch.yml):
dsh plugin --profile web add dsh-import-agents
You can also specify a version, install from the GitHub short format, or uninstall, as written in the README:
dsh plugin --profile web add dsh-import-agents@0.2.6
dsh plugin --profile web add github:Chang-Tong/dsh-import-agents
dsh plugin --profile web remove dsh-import-agents
When installing a plugin from Git with source code, the installation process will run the prepare build step. The README notes that pnpm ≥ 10 blocks scripts by default: the first add may fail with an allowBuilds prompt. Add the prompted key to the profile’s pnpm-workspace.yaml and run the command again. This step is not required when installing pre-built tarballs or local checkouts.
Verify the installation according to the repository steps after installation:
1. Restart dsh web —— host-side plugins register slash commands on startup, and the frontend sync button is loaded by dsh web.
2. Refresh the page —— The RPC connection of the old page is disconnected after restarting. Without refreshing, the button and commands will fail.
3. Confirm that the 同步 / Sync button appears in the input box toolbar, and that /import-all responds when entered.
Both the directory page and the repository remind users that the plugin runs with the permissions of the current dsh process, and may execute code during installation. You should check the source code repository and license before installing.
Typical Usage¶
1. One-click import of four sources and agents¶
After restarting and refreshing the page, click the 同步 button in the composer toolbar, or enter directly:
/import-all
The imported sessions will appear in the session list (grouped by workspace); the imported agents will appear as skills. Everything is idempotent, and you can run it as many times as you want. If it shows “New imports 0, skipped N existing entries”, it means these sessions have already been imported and will not be written repeatedly.
To import only one source, or only agents:
/import-pi
/import-opencode
/import-codex
/import-claude-code
/import-agents
Common options (from the README): --limit N, --project substring, --since (ISO format or milliseconds), --no-tools, --tools-as-text, --tool-truncate N.
When old imports have not been mounted to workspaces:
/attach-workspaces
2. Override default paths and migration prompts¶
Default paths and switches can be overridden in the plugin’s insertion line. The plugin ID in cordis.patch.yml is import-pi-opencode, and the package name is dsh-import-agents. The configuration keys listed in the repository are as follows:
| Key | Default Value | Description |
|---|---|---|
offerOnStart |
true |
Whether to ask for migration when starting a new top-level session |
piRoot |
~/.pi/agent/sessions |
pi session root directory |
piAgentRoot |
~/.pi/agent |
pi agents / prompt root directory |
opencodeDb |
~/.local/share/opencode/opencode.db |
opencode SQLite path |
opencodeConfig |
~/.config/opencode |
opencode agents root directory |
codexRoot |
~/.codex/sessions |
codex session root directory |
claudeRoot |
~/.claude/projects |
claude-code project root directory |
skillsRoot |
$DSH_AGENTS_HOME/skills |
skill output root directory |
toolTruncate |
1000 |
Tool call parameter truncation length (in characters) |
The way to turn off the startup prompt is config: { offerOnStart: false }.
3. CLI in the repository source code (without going through dsh)¶
The README provides a command-line entry that does not start dsh. It runs in dry-run mode by default, and only writes data when adding --apply. You need to execute node import.mjs in the repository checkout (this file is in the GitHub source root directory; the npm files list in package.json does not include it, so it cannot be used by default after installing the npm package):
node import.mjs all
node import.mjs all --apply
node import.mjs sessions codex --apply --limit 20
node import.mjs agents --apply
node export.mjs
all has the same meaning as /import-all in the GUI: imports for all four sources plus agents (CHANGELOG 0.2.5). export.mjs writes sessions as Markdown, and outputs to $DSH_HOME/exports/<source>/<session-id>.md by default. It supports --source, --project, --limit, --since, --out, --no-reasoning, --no-tools.
Applicable Scenarios and Notes¶
It is suitable for the following use cases:
- You have accumulated project sessions in pi, OpenCode, Codex or Claude Code and want to migrate to DeepSeek Harness while retaining reasoning blocks and tool call trajectories.
- You need to convert custom agents and system prompts from pi / OpenCode into dsh skills, with metadata.source / metadata.kind for traceability.
- You want to use the Web UI’s sync button or /import-all for idempotent synchronization instead of manually copying JSONL files.
Please note the following before use:
1. Permissions and License. The plugin runs with the permissions of the current dsh process, and may execute code during installation. Read the repository source code and the MIT license before installing.
2. Runtime Version. Node.js ≥ 22.19 is required. The sync button and client bundle are targeted at the web profile; headless environments will skip migration prompts.
3. Must Refresh After Restart. The RPC connection of the old page is disconnected after restarting dsh web. Failing to refresh will cause failures when clicking sync or running slash commands.
4. Tool Results May Be Placeholders. Most source formats do not store tool results. Imports retain the calls and write placeholder tool/result so that trajectories can display cards, but the result content does not equal the real output of the original tool.
5. OpenCode Will Not Crash with Missing Libraries. CHANGELOG 0.2.1: The opencode reader will treat a non-existent database as “no sessions” instead of crashing.
6. Do Not Mix Directory Page Commands with Guesses. The directory page installation entry is dsh plugin add github:Chang-Tong/dsh-import-agents; the README recommends the npm method with --profile web. Both can be used, choose according to the profile you are using, and do not manually construct commands that have not been published on the official pages.
Summary¶
dsh-import-agents converts sessions from pi, OpenCode, Codex and Claude Code into resumable sessions in DeepSeek Harness, and converts corresponding agents / prompts into skills. The sync button, slash commands and migration prompts for new sessions cover daily migration workflows. It is a community MIT-licensed plugin and not an official DeepSeek component; the directory page is only responsible for indexing and providing installation commands.
The installation entry is subject to the directory page:
dsh plugin add github:Chang-Tong/dsh-import-agents
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-import-agents/
GitHub: https://github.com/Chang-Tong/dsh-import-agents