cco-chat-import
Verified@chatcode/cco-chat-import ¡ v0.17.4 ¡ MIT ¡ Web UI
Import Claude Code / Codex / ChatGPT / Cursor / Gemini / Reasonix / Pi Coding Agent / opencode / ZCode / Grok Build / OpenClaw / Hermes / Kimi CLI / Qoder CLI / WorkBuddy conversation histories as resumable ChatCode CLI sessions, plus movein asset migrati
Install
dsh plugin add @chatcode/cco-chat-import Confirm the layer applied with dsh --profile default --dump-config â see the install guide.
Source
Published to npm without a public repository. Inspect the package contents before installing.
Tags
Readme
ChatCode CLI Chat Import
A ChatCode CLI plugin that imports conversation history from 19 AI coding tools, so you can continue right where you left off.
All sessions, continued in ChatCode CLI.
Intro
ChatCode CLI Chat Import imports conversation history with full context from other agents, turning it into a seamlessly resumable ChatCode CLI session.
Now covers import from 19 agents: Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, MiMo Code, ZCode, Grok Build, OpenClaw, Pi Coding Agent, Hermes, Kimi CLI / Kimi Code, Qoder CLI, WorkBuddy, Qwen Work CN (åéŽåå Ŧ), and legacy DSH session logs.
Export back to: Claude Code, Codex, Kimi Code.
Install
chatcode-cli plugin --profile web add @chatcode/cco-chat-import # npm package
chatcode-cli plugin --profile web add -w link:/path/to/cco-chat-import # local checkout (symlink)
Usage
Startup auto import
On the first ChatCode CLI startup after installing the plugin, existing ChatCode CLI history is scanned and imported automatically. The lower-left sidebar shows the scan state, then completed / total while importing, followed by the total, successful, failed, and skipped counts for five seconds. Later startups do not rescan when imports.json already exists.
- Import â pick the conversations to import from the "Import sessions" panel in the bottom-right of the GUI and import with one click, or have your agent call the context tool:
import_chat({ format: "claude", path: "~/.claude/projects" })
import_chat({ format: "chatgpt", path: "~/Downloads/chatgpt-export/conversations.json" })
import_chat({ format: "local-jsonl", path: "D:\downloads\session.jsonl" })
Reasonix directory imports conservatively collapse only recovery ancestors proven by both a strict semantic prefix and an explicit parent_id lineage. Ambiguous or divergent files remain separate; use lineageMode: "physical" for one session per JSONL.
Claude Code imports exclude complete, known CLI-injected tag-wrapped records (such as command context and system reminders) from user turns.
External-agent transcripts carry a protected empty system/message head as the first surface message (inside the first step, before any user turn). The source transcript has no real system prompt, so the head is intentionally empty â it reserves the required head slot so that re-opening an imported session after a restart can legally inject the engine's system prompt on resume, instead of a corrupt mid-log system/message.
Native ChatCode CLI / DSH logs retain their existing system head, developer messages, and compaction history. Surface replacement ranges and event references are remapped together when runtime events are removed, so compressed histories remain resumable.
If an earlier native import fails to resume, re-import the original file with import_chat using format: "cco", force: true to create a fresh copy. Existing stored logs are not rewritten.
Resume â refresh the session list, open the imported session, and keep chatting from where the source left off.
Sync (optional) â the panel's "Sync" tab offers bidirectional incremental sync, off by default. Sub-agent conversations are filtered out by default in both directions.
Full tool / command usage (parameters, examples, edge cases) lives in docs/USAGE.md.
Hooks, MCP and commands
The plugin bundle includes an assets plugin, so CLI and Web users do not need to add hook or MCP entries to cordis.patch.yml. On every startup it reads the selected $CHATCODE_CLI_HOME (legacy $DSH_HOME, default ~/.chatcode-cli), creates settings.json with an empty hooks object only when the file is missing, and mounts the native Claude command-hook bridge. Existing settings are preserved. Project .chatcode-cli/settings.json and settings.local.json hooks are also loaded. Hook bridge and MCP client packages are supplied by ChatCode CLI; another host must provide compatible peers.
MCP reads both user and current-project configuration. Precedence is the current project's .mcp.json, then project .chatcode-cli/settings.local.json, settings.json and .mcp.json, then ancestor .mcp.json files, followed by ~/.chatcode-cli.json and the selected home's .mcp.json and settings.json. Different names are combined; each duplicate name uses its highest-priority declaration. /hooks and /mcp-status inspect the current session's project and show source paths. Servers marked disabled: true are skipped. ${VAR} and {env:VAR} references are resolved from the startup environment. Explicit hook paths and MCP server names in the user's plugin tree take precedence, including disabled entries, so existing manual and migrated configuration is not mounted twice.
The host filesystem provider reads user and project commands/*.md directly for /name invocation, and reads skills from their own directories. Commands remain in commands; startup and invocation never generate a skill copy or .chatcode-command.json. The provider re-reads the command body on invocation and watches command additions, changes and deletions. Within one scope a same-name skill takes precedence; project commands override user commands. This requires a ChatCode CLI host with direct Markdown command support. Legacy auto-movein.done markers do not suppress startup asset loading. Restart after editing hooks or MCP. CHATCODE_CLI_IMPORT_AUTO_MOVEIN=0 disables startup asset loading.
Startup removes unedited command skill copies from older releases when their legacy metadata verifies the content, and removes the old metadata. User-edited skills and other files are preserved; records for other projects in the old user-level cco-chat-import/command-skills.json remain until those projects are opened. No new command state is created. Explicit ChatCode CLI asset migration also keeps Markdown commands in commands; external-agent migration retains its format converters.
For an explicit preview or migration from another supported agent, use import_assets (default preview, apply: true to write) or cco-chat-import movein. These tools retain the configuration migration workflow, including permission bridge installation; startup loading uses an already available permission bridge and reports a missing one without downloading packages.
Features
| Capability | Entry points | Description |
|---|---|---|
| Batch import | import_chat (19 formats) ¡ scan_discover ¡ sidebar panel |
Import 18+ sources with one tool; each conversation becomes its own session |
| Import history & purge | sidebar panel History tab | View imports.json records; remove plugin-created sessions (with confirmation) |
| Full-fidelity resume | Imported sessions | Tool calls & results, reasoning, titles, models and timestamps carry over |
| Export back | export_chat (format: claude / codex / kimi) |
Serialize ChatCode CLI sessions back to Claude / Codex / Kimi |
| Bidirectional sync | panel "Sync" tab | Incremental sync in both directions (external â ChatCode CLI), off by default |
Publishing
Publishing runs the test suite and a package dry run, including the build checks. Git checks are handled by pnpm for pnpm publish; use pnpm publish --no-git-checks --tag latest --access public --registry https://registry.npmjs.org/ to explicitly allow uncommitted changes. Direct npm publish still requires tracked files to be committed and reports a clear error otherwise.
Docs
| Document | Description |
|---|---|
| Usage Reference | Full parameters, examples and edge cases for every tool / command |
| Interchange protocol | Interchange v1 protocol and bundle format |
| Changelog | Version history |
| Roadmap | Shipped / planned |
| Contributing | Development setup, commit rules, security & privacy |
Star History
Hooks also support user or project .chatcode-cli/hooks/settings.json with a top-level hooks field, alongside existing settings hooks. Source development requires local plugin sources; pnpm cco in registry mode continues to use published plugins.
Before packing or publishing, prepack rebuilds from source, then packs and extracts the npm artifact to verify user/project hooks and MCP discovery. Source tests do not replace artifact verification. Run npm run verify:packed-assets to check the current build. Publish new plugin versions containing these changes, then update both canonical and alias dependencies in the CLI and rebuild it.