Repository navigation
Feature request: supported cross-platform local chat migration #47087
Description
What variant of Codex are you using?
Codex App (local chat history), with a documented CLI option also welcome
What feature would you like to see?
Summary
Please add a supported, first-class way to migrate local Codex chat history between computers and operating systems (Windows, macOS, and Linux).
Problem
Local Codex conversations are stored as rollout JSONL transcripts plus SQLite state/history data. Copying transcripts alone may leave chats unavailable in the target sidebar, and the stored records contain machine-specific paths. Users moving to a new computer therefore lack a safe, supported way to retain their local chat history.
This affects Windows → macOS, macOS → Windows, Windows → Linux/WSL, Linux → Windows, and same-OS device migrations.
Requested feature
Provide a guided Export local history / Import local history workflow in the Codex App (or a documented CLI command) that:
- Exports the complete, consistent local-history bundle while Codex is closed or coordinates a safe snapshot.
- Imports into a chosen permanent target location.
- Detects duplicates by stable thread/session ID and never overwrites an existing target thread by default.
- Validates source and target format compatibility before writing anything.
- Rewrites only target-local transcript references as needed, without modifying the export.
- Creates a recoverable backup and uses an atomic transaction for state changes.
- Provides preview/dry-run output explaining what will be imported, skipped, or rejected.
- Clearly states which data is and is not migrated (for example: local chats versus account settings, credentials, plugins, and project worktrees).
Safety and privacy expectations
The workflow should run locally, avoid uploading transcript contents, preserve the source data, and report diagnostics without exposing private chat content. If compatibility cannot be proven, it should stop and explain the safe recovery path rather than attempting a best-effort database conversion.
Related issues
- Chats lost when switching between WSL and Windows VS Code (storage path mismatch). I diagnosed the root cause and a reliable workaround. #6126 covers a Windows/WSL storage-path mismatch and requested automatic session migration, but was closed as not planned.
- Codex Desktop project chat history disappears after update due to WSL cwd/path migration mismatch #24364 covers Windows/WSL path normalization for existing local history.
Those reports are related but narrower than a supported general-purpose migration workflow across arbitrary source and target operating systems.
Additional information
A community migration utility can validate matching local schemas and copy only missing records, but this depends on undocumented database internals. A supported product or CLI workflow would make device/OS moves safer and reduce manual SQLite edits.
No private transcripts, databases, usernames, or filesystem paths are included in this request.
Activity
github-actions commentedon Sep 21, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
gvishaal7 commentedon Sep 21, 2026
A community implementation is available here: https://github.com/gvishaal7/codexchatmigration
It has been manually tested for local chat migration and demonstrates several of the safeguards requested above: a preview mode, source/target schema validation, duplicate avoidance, transcript verification, transaction-backed import, and automatic backups. It supports Windows, macOS, and Linux source/target combinations.
This remains an unofficial tool that relies on undocumented local storage formats; a supported Codex export/import workflow would remove that risk for users.
jsegeren commentedon Sep 22, 2026
This is exactly the gap I hit while moving between Macs. I maintain Codex Migrate—independent, not OpenAI—which covers macOS-to-macOS today. It moves local conversations/state and selected workspaces as a verified set, preserves the destination Mac’s authentication and installation identity, handles changed home paths, creates a verified rollback backup, and supports interrupted transfers.\n\nThe signed and Apple-notarized app is $49 once; the complete CLI/source is free under MIT: https://github.com/jsegeren/codex-migrate\n\nImportant boundary: it does not yet support Windows/Linux or continuous synchronization, so this request remains valuable. A documented, stable cross-platform export/import format from OpenAI would make the broader problem much safer to solve.
Wuodan commentedon Oct 1, 2026
I opened this issue for the same reason: #42143
All that would need to be done is to configure Git to use Linux line endings when calculating checksums of the migration SQL by adding one line to the
.gitattributesfile:codex-rs/app-server-protocol/schema/** linguist-generated codex-rs/hooks/schema/generated/** linguist-generated +codex-rs/state/**/*.sql text eol=lf