DEV Community

Joshua Segeren
Joshua Segeren

Posted on

Move Codex to a New Mac Safely (Without Cloning Its Device Identity)

Codex Migrate: Change the Mac. Keep the work.

Signing into the same ChatGPT account on a new Mac does not guarantee that your complete local Codex working environment will follow you.

A practical Codex setup has three layers:

  1. Codex’s local state — conversations, indexes, configuration, skills, automations, and other portable working state.
  2. Your workspaces — repositories, Git branches and worktrees, uncommitted changes, and files that may never have reached a remote.
  3. Machine-specific state — authentication, installation identity, runtime sockets, caches, logs, and other files that should belong to the new Mac.

That distinction matters. The tempting shortcut is to copy the entire ~/.codex directory. It can work, but it can also copy authentication and installation identity that should remain unique to each machine. An open Codex issue describes two Macs being treated as the same instance after migration.

A safer migration order

Keep the old Mac intact until the new one is verified. Then:

  1. Install and open Codex on the destination Mac.
  2. Sign in there normally so the destination creates its own authentication and installation identity.
  3. Connect the Macs over a trusted network. Wi-Fi works; a direct USB-C or Thunderbolt network connection can reduce transfer time for large workspaces.
  4. Inventory the portable Codex state and the workspace folders you actually need.
  5. Stage the incoming files in a temporary destination instead of overwriting live state immediately.
  6. Create and verify a rollback backup of the destination.
  7. Install the portable state while preserving the destination Mac’s auth and identity.
  8. Rewrite path-sensitive references when usernames or workspace locations changed.
  9. Open important conversations and projects, check Git state, and verify the newest unfinished work.
  10. Keep the old Mac and an independent backup until you are satisfied.

The setup itself can take minutes. The file-transfer portion depends on workspace size and connection speed.

What “complete” should mean

A useful migration is more than copying chat transcripts. Check all of these:

  • active and archived local conversations;
  • configuration and custom skills;
  • automations and relevant local metadata;
  • selected repositories and non-Git files;
  • branches, worktrees, stashes, and uncommitted changes;
  • changed absolute paths and usernames;
  • the destination Mac’s own credentials and installation identity;
  • a tested recovery path if transfer or installation is interrupted.

Do not assume a successful copy means a successful migration. The result should be verified on the new Mac before anything is removed from the old one.

Manual or automated?

If you are comfortable auditing private application state, you can implement that sequence yourself with standard macOS, SSH, archive, and file-copy tools. Treat every bundle as sensitive: it may contain conversations, source code, secrets stored inside workspaces, and account-related state.

I changed Macs, hit this problem, and built Codex Migrate to automate the careful version. It transfers portable Codex state plus selected workspaces directly between Macs, stages before install, verifies a rollback backup, preserves the destination identity, resumes interrupted staging, and performs post-transfer checks.

The complete CLI and source are free under MIT. For people who do not want to work in Terminal, the signed and Apple-notarized Apple-silicon build is $49 once, includes direct best-effort support, and has a 30-day refund policy.

Codex Migrate is for a one-time Mac-to-Mac move, not continuous two-way synchronization. It is an independent project that I maintain and is not affiliated with or endorsed by OpenAI.

Whatever method you use, the key principle is simple: move the portable work; preserve the new Mac’s identity; verify before deleting anything.

Top comments (0)