How to use dsh-chat-import
Import conversation history from 15 external AI coding agents (Claude Code, Codex, ChatGPT, Cursor, opencode, etc.) as fully resumable
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-chat-import
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add dsh-chat-import
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- External → DSH: periodically scan Claude / Codex / Grok for new or grown sessions and import incrementally (same idempotent append state machine).
- DSH → External: write new complete DSH turns back. Imported sessions append to their source file; native DSH sessions get a copy under that agent's default root.
- Both directions are off by default. Turn them on in the panel, or click Sync now. Config lives in
$DSH_HOME/dsh-chat-import/sync.json. - Watch (lazy) mode — when enabled, opening the panel checks the mtimes of already-imported sources and incrementally appends any that grew (idempotent, no resident watcher).
force: true— create a fresh full copy under a new id (import-<sessionId>-<n>) even when the source was already imported; the old session is never modified.
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
Does it require additional configuration after installation?
No. Just restart dsh after installation, the plugin consumes the host's public service by default; optional environment variables (DSH_IMPORT_CONTEXT_BUDGET, DSH_IMPORT_SESSION_HINT, DSH_IMPORT_CONTEXT_BRIDGE) are used to adjust context budget, disable session start hint, and enable Claude context bridging.
Where is data stored? Will it modify source files?
Will not rewrite any source files. Import results are written to the DSH session directory, import metadata goes to $DSH_HOME/dsh-chat-import/imports.json ($DSH_HOME defaults to ~/.dsh); source transcripts and SQLite database are read-only throughout.
Will it write repeatedly if I import the same history multiple times?
No. Unchanged source files are skipped idempotently, only reading not writing; growing source files append new rounds to the same session; shrinking source files are detected and reported, not silently overwritten. force:true can save a complete copy with a new id.
Can I continue chatting in imported sessions?
Yes. During import it tries to use agents.create path and mounts default preset scope and default model, tool surface is consistent with native DSH sessions, refresh session list and open to continue chatting.
How to undo an imported session?
Use retract_import({ sessionId }) to remove registry record and return manual deletion guidance; the plugin never calls any deletion, you need to manually delete session artifacts following the guidance, then re-import with force:true to get a fresh session.
Which AI coding tools are supported?
15 sources: Claude Code, Claude-3p new client, Codex/ChatGPT CLI, ChatGPT web export, Cursor, Gemini CLI, Reasonix (including desktop version), opencode, ZCode (z.ai CLI), Grok Build, OpenClaw, Pi Coding Agent, Hermes, Kimi CLI/Kimi Code, Qoder CLI, and any local JSONL (auto-recognized).
Can I export DSH sessions back to other agents?
Yes. export_claude serializes DSH sessions to Claude Code JSONL; export_codex and export_kimi output Codex rollout and Kimi wire formats; export_bundle outputs a portable exchange package with SHA-256 dual fingerprints, restore_bundle restores on another machine.
What about very long histories?
Default trims to 550k token context budget (parameter budget or environment variable DSH_IMPORT_CONTEXT_BUDGET can override, priority: tool parameter > environment variable > dynamic model window > 550k); for Claude sessions, compacted:true only exports the last compaction summary plus tail.
— source: plugin_wiki.faq_json
Compatibility
- DSH: 0.1.0-rc.6+ (peer @deepseek-ai/dsh-tools ^0.1.0-rc.6)
- Node: >=22.13 (engines.node)
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule