October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Cupertino desk4 min

How to Move OpenAI Codex to a New Mac Without Losing Local Work

A safe Codex Mac migration starts with separate backups of repositories, Codex settings, project instructions, worktrees, and important local files—followed by checks on the new Mac before retiring the old one.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To move Codex safely, preserve your repositories and any uncommitted or ignored files, back up your active Codex home and project instructions separately, then set up Codex and sign in on the new Mac. Open each project and verify its Git state, settings, worktrees, and essential conversations before you erase or retire the old Mac. A clean clone or a general Mac migration alone is not proof that all local Codex data has arrived.

What you need to move

Codex work is spread across several kinds of local data. Treat each separately so a successful app installation or repository clone does not give a false sense that everything was restored.

As an Amazon Associate I earn from qualifying purchases.

  • Repository and Git state: tracked files, uncommitted edits, untracked files, branches, and commits.
  • Codex user settings and global instructions: typically in the Codex home directory, normally ~/.codex, unless CODEX_HOME changes its location.
  • Project settings and instructions: repository-level .codex/config.toml, AGENTS.md, and applicable nested instruction files.
  • Worktrees and ignored local files: separate working directories may contain changes or machine-specific files not present in the main checkout.
  • Conversation history: Codex says its app can pick up session history and configuration from the CLI and IDE extension, but that is not a guarantee that copying a particular folder restores every desktop conversation. See OpenAI’s Codex app announcement.

Choose a migration route

Route What it covers What to check
Selective copy Lets you focus on repositories, the active Codex home, project instructions, and specific local-only files. Make an inventory first; a manual copy will not find files you overlooked.
Migration Assistant Apple says it can transfer documents, apps, user accounts, and settings from another Mac or a Time Machine backup. It can be launched during setup or later from Utilities. See Apple’s Migration Assistant guide. This is broad Mac migration support, not a Codex-specific promise that every worktree or conversation will be restored. Verify Codex data on the new Mac.

Selective copying offers more control over which local files you preserve; Migration Assistant may be more convenient for a wider Mac transfer. Either way, verify Codex-specific state before relying on the destination.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prepare the old Mac

Inventory repositories and worktrees

  1. Find every repository you use with Codex, including any stored outside your usual development folder. Note its path and the branch you expect to continue working on.
  2. In each repository, run git status --short --branch in Terminal. Review modified, untracked, and staged files. Preserve needed changes by copying the complete working directory or committing/stashing as appropriate; do not assume a clone from a remote contains local edits.
  3. Check for separate Codex-managed worktrees. Codex documents these under $CODEX_HOME/worktrees; inspect each one for work that is not in the main checkout. Its worktree documentation also explains that a new worktree can include local uncommitted changes, while ignored files are copied into managed worktrees only when selected by .worktreeinclude.
  4. Identify ignored files your development setup needs, such as local environment files or machine-specific settings. Git does not include ignored files in a normal clone. Back them up deliberately, and keep secrets out of shared archives or broadly accessible cloud folders.

Back up Codex configuration and instructions

Find the active Codex home. The default is ~/.codex, but if you set CODEX_HOME, that variable points Codex to a different location. Preserve the active home and note the custom path and how it is set. OpenAI documents the personal configuration file as ~/.codex/config.toml; the configuration guide describes user defaults and project-level overrides.

#1 Best Overall
Sale
Apple 2025 MacBook Pro Laptop with Apple M5 chip with 10‑core CPU and 10‑core GPU: Built for AI, 14.2-inch Liquid Retina XDR Display, 16GB Unified Memory, 1TB SSD Storage; Space Black
  • SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
  • HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
  • BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
  • ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
  • APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*

Also preserve project-specific .codex/config.toml files and relevant AGENTS.md instruction files in the repositories. Global guidance can be in ~/.codex/AGENTS.md or an override file; repository guidance can be at the root or in nested directories. Codex loads project configuration only when the project is trusted. See OpenAI’s AGENTS.md instructions guide.

Configuration may contain sensitive values. Copy only what you need, store backups securely, and expect to authenticate again on the new Mac; do not treat copying credentials as a required or documented sign-in procedure.

Rank #2
Sale
Apple 2026 MacBook Pro Laptop with Apple M5 Pro chip with 18-core CPU and 20-core GPU: Built for AI, 16.2-inch Liquid Retina XDR Display, 24GB Unified Memory, 1TB SSD, Wi-Fi 7; Space Black
  • FAST RUNS IN THE FAMILY — The 16-inch MacBook Pro with the M5 Pro or M5 Max chip brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. With all-day battery life, double the starting storage,* and a breathtaking Liquid Retina XDR display, it’s pro in every way.*
  • BUCKLE UP — Along with a next-generation CPU, faster unified memory, and up to 2x faster SSD storage,* M5 Pro and M5 Max feature a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance and on-device training capabilities. So you can blaze through demanding workloads at mind-bending speeds.
  • BUILT FOR AI — Apple silicon, and every major component that powers it, is designed to run demanding on-device AI workloads like LLM inference and training. And Apple Intelligence helps you write, express yourself, and get things done effortlessly with groundbreaking privacy protections at every step.*
  • ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.*
  • MACOS RUNS APPS FAST — All your go-to apps run lightning fast in macOS, including built-in apps like FaceTime and Messages. Plus, built-in virus protection and free software updates help keep your Mac running smoothly and securely.

Set up Codex on the new Mac

  1. Install or open the Codex app or CLI you use, then sign in with the intended account or organization. Codex access and workflows can vary, so follow the current setup for your account rather than relying on an old plan assumption. OpenAI’s Codex plan help page describes current access information.
  2. Make the preserved repository available locally. If you plan to clone it from its authoritative remote, first confirm that no unique edits or local-only files remain only on the old Mac.
  3. Restore the Codex home to the new Mac. If you used a custom CODEX_HOME, restore that location and re-establish the environment setting; do not put the files in ~/.codex by default unless that was the active home.
  4. Restore project-level .codex/config.toml and instruction files with their projects. Open the project in Codex and trust it if appropriate so project configuration can load.
  5. Grant Codex access to the local project folder when prompted, then open the intended repository rather than an unrelated copy or a stale worktree.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify the migration before retiring the old Mac

Use the new Mac for a deliberate check of the files and context you rely on. Do not erase the source Mac until these checks pass:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Repository: run git status --short --branch; confirm the expected branch, commits, and working-tree changes.
  • Local development files: confirm any needed ignored files, including local environment or machine-specific settings, are present and usable.
  • Worktrees: open each worktree that matters and compare its files with the source Mac or backup.
  • Codex configuration: check the active home, any custom CODEX_HOME, and project-level settings.
  • Instructions: confirm that global and repository AGENTS.md files and other relevant instruction files are available to Codex.
  • History: open the former CLI or IDE threads and inspect app history for conversations you need. The app’s stated CLI/IDE history pickup does not establish that every desktop chat is portable by copying a folder.

Keep the old Mac or a usable backup intact until you can see the required code and Codex context on the destination. That is a cautious safeguard, not a guarantee that a particular backup method contains every Codex item.

Best Value
Sale
Apple 2025 MacBook Pro Laptop with Apple M5 chip with 10‑core CPU and 10‑core GPU: Built for AI, 14.2-inch Liquid Retina XDR Display, 16GB Unified Memory, 1TB SSD Storage; Silver
  • SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
  • HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
  • BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
  • ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
  • APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*
Rank #4
Sale
Apple 2025 MacBook Pro Laptop with Apple M5 chip with 10‑core CPU and 10‑core GPU: Built for AI, 14.2-inch Liquid Retina XDR Display, 24GB Unified Memory, 1TB SSD Storage; Space Black
  • SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
  • HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
  • BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
  • ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
  • APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*
Rank #3
Sale
Apple 2026 MacBook Pro Laptop with Apple M5 Pro chip with 18-core CPU and 20-core GPU: Built for AI, 16.2-inch Liquid Retina XDR Display, 48GB Unified Memory, 1TB SSD, Wi-Fi 7; Space Black
  • FAST RUNS IN THE FAMILY — The 16-inch MacBook Pro with the M5 Pro or M5 Max chip brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. With all-day battery life, double the starting storage,* and a breathtaking Liquid Retina XDR display, it’s pro in every way.*
  • BUCKLE UP — Along with a next-generation CPU, faster unified memory, and up to 2x faster SSD storage,* M5 Pro and M5 Max feature a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance and on-device training capabilities. So you can blaze through demanding workloads at mind-bending speeds.
  • BUILT FOR AI — Apple silicon, and every major component that powers it, is designed to run demanding on-device AI workloads like LLM inference and training. And Apple Intelligence helps you write, express yourself, and get things done effortlessly with groundbreaking privacy protections at every step.*
  • ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.*
  • MACOS RUNS APPS FAST — All your go-to apps run lightning fast in macOS, including built-in apps like FaceTime and Messages. Plus, built-in virus protection and free software updates help keep your Mac running smoothly and securely.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.