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 real bottleneck is no longer installing plugins, but rather scattered historical conversations: Claude Code’s JSONL files, Codex’s rollouts, Cursor’s agent-transcripts, Reasonix’s session directories, plus ChatGPT web exports, and opencode/ZCode’s SQLite databases.
These files can be opened individually, but cannot be directly continued as dsh sessions. Tool calls, thought blocks, and workspace paths do not match, and they will not appear in the sidebar. That is exactly what dsh-chat-import does: it reads the chat logs from external agents and saves them as resumable DeepSeek Harness sessions, and can also export them back to the target format when needed.
This article is collated after cross-checking with the community plugin directory page, GitHub repository README (both Chinese and English versions), package.json, CHANGELOG, and npm page. The community directory deepseek-harness-plugin.com is an independent site and has no official affiliation with DeepSeek / HyperTrade. Do not treat it as an official app store.
What is this¶
dsh-chat-import is a Session & Message type DeepSeek Harness plugin maintained by Nwflower, with the GitHub repository at Nwflower/dsh-chat-import. It is licensed under MIT (Copyright 2026 Nwflower, Scarlett). The npm package name is also dsh-chat-import, and the current version is 0.5.1 (released on 2026-08-16). The main language is JavaScript, and the runtime requirement is Node.js >= 22.13 (the repository notes this is the first version where node:sqlite works without flags). It targets the dsh 0.1.x line, with a peer dependency on @deepseek-ai/dsh-tools ^0.1.0-rc.6, and the README states it has been tested on dsh 0.1.0-rc.6.
The problem it solves is very specific: import chat logs from Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, ZCode, Grok Build, OpenClaw, Pi Coding Agent, Hermes, Kimi CLI / Kimi Code, and even DSH’s own session logs into fully fidelity, resumable dsh sessions. The source files are read-only and will not be modified; it does not touch the dsh engine. After import, the sessions are grouped into corresponding workspaces based on the source cwd, and you can resume chatting from exactly where the source record left off.
The GitHub repository page showed 49 stars at the time of the author’s review; the community directory page marked 30 stars at that moment. Star counts should be referenced from the repository page, as the directory numbers may lag behind.
Core Features¶
The repository divides its capabilities into import, resuming conversation, format conversion, and backup categories. Below only covers the parts explicitly written in the README that can be reproduced according to the documentation.
14 Sources plus Local JSONL¶
Each source corresponds to an import tool, and can accept either a directory or a single file. The storage locations are subject to the repository documentation:
| Source | Default Location | Tool |
|---|---|---|
| Claude Code | .jsonl files under ~/.claude/projects/ |
import_claude |
| Claude-3p (new client) | Windows %LOCALAPPDATA%\Claude-3p\claude-code-sessions |
import_claude |
| Codex / ChatGPT CLI | rollout-*.jsonl under ~/.codex/sessions/YYYY/MM/DD/ |
import_codex |
| ChatGPT Web Export | conversations.json at any path |
import_chatgpt |
| Cursor | agent-transcripts under ~/.cursor/projects/ |
import_cursor |
| Gemini CLI | session-*.json under ~/.gemini/history/ |
import_gemini |
| Reasonix (CLI + Desktop) | ~/.reasonix/sessions/, plus %APPDATA%\reasonix\projects\ for Windows |
import_reasonix |
| opencode | ~/.local/share/opencode/opencode.db |
import_opencode |
| ZCode | ~/.zcode/cli/db/db.sqlite |
import_zcode |
| Grok Build | ~/.grok/sessions/ |
import_grokbuild |
| OpenClaw | sessions/*.jsonl under ~/.openclaw/agents/ |
import_openclaw |
| Pi Coding Agent | ~/.pi/agent/sessions/ |
import_pi |
| Hermes | ~/.hermes/ (Windows: %LOCALAPPDATA%\hermes) |
import_hermes |
| Kimi CLI / Kimi Code | wire.jsonl under ~/.kimi/sessions/ and ~/.kimi-code/sessions/ |
import_kimi |
| DSH Session Logs | session.jsonl (can have .zstd suffix) under ~/.dsh/sessions/ |
import_dsh |
| Any Local JSONL | Any .jsonl file or directory |
import_local_jsonl |
Everything from the source is preserved: session ID, cwd, title, model, timestamp, tool calls and results, and thought blocks. Content that cannot be recorded by the original format will be marked in the import report instead of being silently discarded. import_local_jsonl will automatically recognize dsh / claude / codex / cursor / reasonix / pi / openclaw / hermes formats, and use the format parameter to force specification if the automatic recognition fails.
Full Fidelity Import and Resumable Conversation¶
Importing does not mean pasting text into the current dialog box, but creating a new dsh session. The repository notes: the session creation will prioritize calling the host’s agents.create API, attach the default preset scope, and bind the default model, so the tooling surface of the imported session is consistent with native sessions. You can continue the conversation right after opening it.
Workspaces are grouped according to the source cwd: Claude will check the project mapping in ~/.claude.json, Reasonix will decode project slugs to check their disk existence, and apply home directory sandbox protection (do not treat the user’s home directory as a workspace). If the path does not exist locally, it will fall back to the directory where the source file is located, to avoid all sessions being grouped into “Ungrouped”.
Idempotent, Incremental, Preview¶
If you import the same source again, unchanged files will be marked as already-imported and skipped; newly added content will be appended as new rounds to the existing session (marked as appended); if the source file is truncated, it will report sourceShrunk. If you need a complete new copy, use force: true, and the old session will not be overwritten.
preview: true (alias dryRun: true) runs full parsing and conversion but does not write to disk. It is suitable for previewing what will be imported before running the actual import.
Long sessions will be truncated according to the context budget (configurable via the environment variable DSH_IMPORT_CONTEXT_BUDGET), and the truncation result will be written into the return value. For Claude long sessions, you can also use compacted: true to only import the last compressed summary plus the trailing content.
Reverse Export and Portable Backup¶
Import is just one direction. The README also provides:
- export_claude / export_codex / export_kimi: Serialize any dsh session (imported or native) into the target format. By default, Claude exports are written to ~/.claude/projects with a new UUID v4 filename to avoid overwriting existing files; Codex / Kimi exports default to ~/.dsh/exports.
- sync_to_claude: Append new full rounds from the session back to the Claude Code files, with guards to prevent silent overwrites if the file has been modified or truncated externally.
- export_bundle / restore_bundle: Write a .dshbundle.json file with dual SHA-256 fingerprints, which can be copied to another machine to restore the session. If the target machine does not have the original cwd, it will fall back and report the result instead of silently losing grouping information.
- Each export will list degradations (orphaned tool results, skipped injections, skipped attachments).
The sidebar “Import Session” panel also has a sync page: External → DSH and DSH → External are disabled by default, you need to enable them in the panel or click “Sync Now”. The configuration file is located at $DSH_HOME/dsh-chat-import/sync.json.
Discovery, Validation, and Handover¶
scan_discover(): Read-only scan of the default data roots for each format, returning titles, projects, cwd, paths, and import status; no side effects.- There is an “Import Session” entry at the bottom of the browser sidebar (for dsh web), grouped by workspace, with filtering by source, search, and pagination for multi-select imports.
/import,/import-all: Directly import in environments where the dshcommandsservice is mounted, without consuming model rounds./resume-claude,/resume-codex: Treat external transcripts as untrusted static history, generate a handover summary (target, files, stop point, next steps) and inject it into the current session; if multiple matches exist, list candidates instead of guessing automatically.verify_session: Read-only structural audit (sequence, event whitelist, tool pairing, etc.) and provide repair prompts by kind.list_imported_sessions/retract_import: List sessions imported by this plugin; retract only clears the registry and provides manual deletion guidance, the plugin will not automatically delete any session data.
There are also import_agents (persist pi / opencode / Claude agents, prompts, and skills as DSH skills) and an optional Claude context bridge (environment variable DSH_IMPORT_CONTEXT_BRIDGE=1, disabled by default). These two are not the main path, please refer to the repository documentation if needed.
Installation and Activation¶
The installation command given on the community directory page is as follows, run it in the DeepSeek Harness terminal:
dsh plugin add github:Nwflower/dsh-chat-import
For reproducible installations, fix the commit hash according to the directory page instructions:
dsh plugin add github:Nwflower/dsh-chat-import#<commit>
The repository README also provides two other installation methods for the web profile: using the npm package and local source code:
dsh plugin --profile web add dsh-chat-import
dsh plugin --profile web add -w link:/path/to/dsh-chat-import
The client injection in package.json declares "platform": "web", and the sidebar panel is designed for dsh web. The dsh plugin command will include the plugin’s bundle declaration into the current profile, the plugin will take effect after restarting dsh. To uninstall, remove the corresponding insert line from the profile’s bundles and restart; already imported sessions will remain in the dsh data directory.
Both the directory page and the repository remind: 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¶
Imports will write to disk immediately, but the dsh session list will not refresh automatically. After importing, you need to refresh the page or session list to see the new sessions. Reading source files outside the workspace and writing export files outside the workspace require the session sandbox to allow the corresponding paths.
1. Discover first, then import¶
Preview the locally available importable sessions in read-only mode:
scan_discover()
scan_discover({ path: "~/.codex/sessions", format: "codex" })
You can also open the “Import Session” panel in the dsh web sidebar, filter by source, and import single or multiple sessions in batches. The panel and the import_* tools use the same pipeline, with consistent semantics for idempotent skipping, incremental appending, force, and context budget.
2. Import files or directories by source¶
Each import_* tool accepts a path parameter. Directories will be scanned recursively, with each file or conversation segment becoming an independent session:
import_claude({ path: "~/.claude/projects" })
import_codex({ path: "~/.codex/sessions" })
import_chatgpt({ path: "~/Downloads/chatgpt-export/conversations.json" })
import_opencode({ path: "~/.local/share/opencode/opencode.db" })
import_local_jsonl({ path: "~/downloads/session.jsonl" })
Preview first without writing to disk:
import_claude({ path: "~/.claude/projects", preview: true })
To restore all branches from a ChatGPT export, use import_chatgpt({ path: "...", branch: "all" }), and each root→leaf branch will become an independent session.
Equivalent slash command syntax (short name, source ID, or full tool name are all acceptable):
/import claude ~/.claude/projects
/import-all
3. Open the imported session to continue chatting¶
Refresh the session list, find the new session (the default ID format is import-<sourceSessionId>), and after opening it, you can continue the conversation from where the source record left off. If you need handover instead of full import:
/resume-claude id:282095ab-1111-4222-8333-444455556666
/resume-codex fix login
An empty parameter will use the most recent session; if multiple matches exist, it will list candidates. The repository explicitly treats external transcripts as untrusted history: it will not repeat system / developer / thinking messages, and old tool outputs are regarded as expired evidence.
4. Export, Backup, Validate¶
export_claude({ sessionId: "import-019f5f27-…" })
export_codex({ sessionId: "…", dryRun: true })
export_bundle({ sessionId: "import-019f5f27-…" })
restore_bundle({ path: "~/backup/sess.dshbundle.json", preview: true })
verify_session({ sessionId: "import-019f5f27-…" })
sync_to_claude({ sessionId: "import-019f5f27-…", dryRun: true })
export_bundle defaults to writing to ~/.dsh/exports/<id>.dshbundle.json. It is recommended to use preview: true before restoring across machines.
Applicable Scenarios and Notes¶
It is suitable for the following use cases:
- You have accumulated project sessions in tools like Claude Code, Codex, Cursor, Reasonix, and want to migrate your workspace to DeepSeek Harness while retaining tool calls and thought processes.
- You need to convert formats between DSH, Claude Code, Codex, Kimi, or use .dshbundle.json for cross-machine backups.
- You want to use scan_discover or preview: true to preview before batch migration, then run the official import.
Please note the following before use:
1. Permissions and Sandbox: The plugin runs with the permissions of the current dsh process; reading history files outside the workspace and writing export directories require sandbox approval. Read the repository source code and the MIT license before installing.
2. Read-Only Source, No Automatic Deletion: Importing does not modify the source JSONL / database; uninstalling the plugin will not delete imported sessions either. retract_import only clears the registry records and prompts you to delete manually.
3. Two-Way Sync Disabled by Default: External → DSH and DSH → External in the panel will not be automatically enabled after installation. When writing back to Claude Code, prioritize using dryRun to check the guard results.
4. Runtime Version: Requires Node.js >= 22.13 and dsh 0.1.x (tested on rc.6 per the documentation). The client panel is designed for the web profile.
5. Errors Will Be Reported, Not Silently Suppressed: Malformed lines and suspected sensitive information will be counted by position (only reporting line numbers and kinds, no content output); fields that cannot be preserved and export degradations will appear in the result.
6. Unfinished Roadmap Items: The README still marks “Codex official App Server API source” as unfinished (REQ-52), and the current Codex import uses the rollout JSONL route.
Summary¶
dsh-chat-import turns external agent session files into resumable sessions in DeepSeek Harness, and adds export, bundle backup, and handover summary functions. It is a community MIT-licensed plugin and not an official DeepSeek component; the directory page only handles inclusion and provides installation commands.
The official installation command is:
dsh plugin add github:Nwflower/dsh-chat-import
Community Directory Page: https://deepseek-harness-plugin.com/en-US/plugins/dsh-chat-import/
GitHub Repository: https://github.com/Nwflower/dsh-chat-import