Import chats from coding agents
Found this helpful? Share it:
Found this helpful? Share it:
Coding agents keep their sessions on your machine. The idapt CLI reads those local stores directly and imports the chats into your workspace: dates preserved, tool calls included as inert history.
Install the CLI once, then run the importer for the agent you are leaving:
idapt chat import --from claude-code
idapt chat import --from codex
idapt chat import --from opencode
The interactive flow signs you in if needed, then asks two quick questions: the scope (only this folder by default, or every project on this computer) and the agent ("Import all" scans every installed harness at once and is the default). It then picks the workspace, asks one confirm line (the chat count and total size), and imports with live progress: a counter, the percent of total size uploaded, and the bytes. Chats are never listed, because everything in scope is imported and re-imports dedupe themselves.
.claude/skills are recreated as idapt skills; existing skill names are kept as they are. Skip with --no-skills.Uploads run one chat per request (gzip when it pays), so no request is ever too big and a failed chat is recorded while the rest continue. Subagent and sidechain threads are skipped in v1 (counted in the scan ledger). Model names are preserved verbatim on assistant messages.
When the import finishes you get one ledger line counting what actually
happened: imported, updated, duplicates ignored, modified ignored, too
large, and errors. Verbose mode (--verbose) adds the scan-skip ledger and
the reason for every skipped chat.
Running the importer again never duplicates chats. Identical sessions are
kept as-is; a changed session that you have not touched in idapt is updated
in place; a changed session you have touched (you wrote to it after the
import) is left alone. Disable the in-place update with
--overwrite skip.
Session stores are unofficial formats; the readers are tolerant and skip unknown record types with a visible count rather than failing.
~/.claude/projects (CLAUDE_CONFIG_DIR honored)~/.codex/sessions (CODEX_HOME honored)~/.local/share/opencode (XDG_DATA_HOME honored)Add --out chats-export.json to write the envelope to disk
instead of importing. A saved export is re-importable later: through the CLI
again, or by uploading it in Settings, Import, Coding agents (CLI export).
Add --dry-run to preview counts without writing anything.
Related articles
Was this helpful?