iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To move Codex safely, preserve your repositories and their Git state, back up Codex’s user-level home and project instructions separately, then install or open Codex and sign in on the new Mac. Reopen each project and verify its files, settings, worktrees, and important conversations before erasing or giving up access to the old Mac.
What you need to move
Codex work is spread across several local places, so moving only the app—or making a fresh Git clone—may leave important context behind. Treat these as separate items to preserve:
- Repository and Git state: project files, branches, commits, uncommitted edits, and any local files Git does not track.
- Codex user settings and global guidance: normally stored in the Codex home directory, usually
~/.codex. - Project-specific settings and instructions: files such as
.codex/config.toml,AGENTS.md, and nested instruction files in the repository. - Codex worktrees: separate local working directories that may contain changes or ignored files not present in the main checkout.
- Conversation history: Codex says its desktop app picks up session history and configuration from the CLI and IDE extension, but that does not establish that copying a particular folder restores every desktop conversation. Check the history you need on the destination.
OpenAI documents the user and project configuration locations, instruction discovery, and worktree behavior in its Codex configuration guide, AGENTS.md instructions guide, and worktrees guide. The Codex app announcement describes its use of CLI and IDE history and configuration: Introducing the Codex app.
Choose a migration route
| Route | What it covers | What to check |
|---|---|---|
| Migration Assistant | Apple says Migration Assistant transfers documents, apps, user accounts, and settings from another Mac or a Time Machine backup. | It is a broad Mac migration method, not a guarantee that every Codex conversation or worktree will be recovered. Check Codex-specific data on the new Mac. |
| Selective copy | Copy the repositories and active Codex home, along with any project-level settings and worktrees you need. | Inventory local-only files and confirm each copied project’s Git state. This offers more control over what is moved, but requires you to identify the relevant folders. |
Apple explains Migration Assistant, including when it can be opened during setup or later from Utilities, in Transfer to a new Mac with Migration Assistant. Either route still calls for the verification steps below.
#1 Best Overall
- 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.*
Prepare the old Mac before transferring
Record and preserve each repository
- Find the directory for every project you use with Codex. Do not assume all projects are under one parent folder.
- In Terminal, change to each repository and run
git status --short --branch. Note the current branch and whether the output shows modified, staged, or untracked files. - Preserve uncommitted work by copying the whole repository directory or by committing or otherwise backing up the changes. A fresh clone from a remote will not contain edits that exist only on the old Mac.
- Identify ignored files needed for development, such as local environment or machine-specific configuration files. They may not be included in a Git clone or an ordinary tracked-file backup. Keep sensitive values out of shared archives and broadly accessible cloud folders.
Find the active Codex home and project instructions
The default Codex home is ~/.codex, including the personal configuration file ~/.codex/config.toml and global instructions such as ~/.codex/AGENTS.md. If you set CODEX_HOME, use that location instead; do not assume the default folder is active. Copy the active Codex home and note any environment setting needed to point Codex to it.
In each repository, preserve its .codex/ directory and AGENTS.md files, including nested instructions relevant to the work. Project-level settings can live in .codex/config.toml. Codex loads project configuration only when the project is trusted, so be prepared to trust the project on the new Mac if appropriate.
Rank #2
- 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.
Account for worktrees and ignored files
Codex-managed worktrees are stored under $CODEX_HOME/worktrees. Inspect any worktree that has changes you want to keep; do not assume those edits are in the main repository. Codex’s worktree documentation says a new worktree can include local uncommitted changes, while ignored files are copied into managed worktrees only when selected by entries in .worktreeinclude. That behavior is not a general backup rule: identify and separately preserve the ignored files you need.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Keep credentials secure
Treat tokens and other credentials as sensitive. Avoid placing them in a shared archive or broadly accessible cloud folder, and expect to authenticate again on the new Mac. This is a prudent security measure, not a documented Codex credential-transfer procedure.
Rank #3
- 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
- Use the Codex app, CLI, or IDE workflow you rely on, and sign in with the intended account or organization. Available access and workflows can change; consult OpenAI’s current Codex plan guidance for account-specific information.
- Restore the active Codex home and any needed project files. If you customized
CODEX_HOME, restore that location and the setting that points to it. - Open the migrated repository, or clone it from its authoritative remote only after confirming that unique uncommitted files and changes were preserved from the old Mac.
- Grant Codex access to the local project folder when prompted, and trust the project only if you intend to load its project-level configuration.
Verify the migration before retiring the old Mac
Check these items on the destination while the source Mac or its backup is still available:
- Project files: Open each important project and confirm that expected files, including necessary ignored local files, are present.
- Git state: Run
git status --short --branchin each repository. Confirm the expected branch and commits, and check that saved uncommitted changes are present. - Codex settings: Confirm the active user configuration and project configuration are available. If project settings appear missing, check that the project is trusted.
- Instructions: Confirm that the intended global and repository-level
AGENTS.mdinstructions are in place. - Worktrees: Open or inspect each worktree you relied on and verify any changes and ignored files it contained.
- History: Open the CLI or IDE threads and Codex app history you consider important. Confirm the conversations you need are accessible on the new Mac; do not infer successful chat recovery just because settings or project files transferred.
Keep the old Mac or a usable backup intact until these checks pass. A transfer is not complete for your purposes until the code and context you rely on are available on the destination.
Quick Recap
Best Value
- 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
- 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.*
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.

