惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 【当耐特】
A
About on SuperTechFans
Last Week in AI
Last Week in AI
雷峰网
雷峰网
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
Recent Announcements
Recent Announcements

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Moving Codex Threads to a New Mac
Rob Koch 🏃🏔🥃💻 · 2026-06-20 · via DEV Community

A pragmatic backup and restore workflow for moving Codex Desktop local state, threads, plugins, and skills between Macs.

Am an Open AI Partner and I'm in the middle of switching Macs from M1 Air to M4 Air. What. a. pain. Especially in the enterprise world where you cannot just simply migrate everything from one Mac to another. You need to set it up as new. So here we go...

I didn't want too much ceremony moving my, err, precious, Codex Desktop setup from one Mac to another and wanted to preserve my active threads, local state, installed skills, plugins, and working context. Don't judge me on AI use, I do use Kiro too tho'!

Politics aside, the short version: most of what you need lives under ~/.codex.

This is not a polished migration tool. It is a pragmatic backup-and-restore approach that worked for moving Codex local state between Macs.

What Gets Moved

The important Codex state is in:
~/.codex
The useful parts include:

  • ~/.codex/sessions/ - conversation rollout files
  • ~/.codex/session_index.jsonl - thread index
  • ~/.codex/state_*.sqlite - thread metadata and local state
  • ~/.codex/logs_*.sqlite - local runtime logs
  • ~/.codex/config.toml - Codex configuration
  • ~/.codex/plugins/, ~/.codex/skills/, ~/.codex/cache/ - installed plugins, skills, and cached assets
  • ~/.codex/auth.json - authentication data

Treat the backup as sensitive because it can include auth tokens and local conversation history.

Back Up The Old Mac

Quit Codex first, then run this from Terminal on the old Mac:

COPYFILE_DISABLE=1 tar --no-xattrs \
--exclude='.codex/vendor_imports/skills/.git/fsmonitor--daemon.ipc' \
-czf ~/Desktop/codex-backup.tgz \
-C ~ .codex

If your version of tar does not support --no-xattrs, use this:

COPYFILE_DISABLE=1 tar \
--exclude='.codex/vendor_imports/skills/.git/fsmonitor--daemon.ipc' \
-czf ~/Desktop/codex-backup.tgz \
-C ~ .codex

The exclude matters because Git can leave a filesystem socket at:

~/.codex/vendor_imports/skills/.git/fsmonitor--daemon.ipc
tar cannot archive sockets, and you do not need that file on the new machine.

The COPYFILE_DISABLE=1 and --no-xattrs flags avoid macOS extended attribute noise. Those attributes are not important for restoring the Codex thread content.

Restore On The New Mac

Move codex-backup.tgz to the new Mac's Desktop.

Quit Codex on the new Mac, then run:

cd ~
mv ~/.codex ~/.codex.backup.$(date +%Y%m%d-%H%M%S) 2>/dev/null
COPYFILE_DISABLE=1 tar -xzf ~/Desktop/codex-backup.tgz -C ~

Then reopen Codex.

Your threads should reappear, including their local metadata and session files.

Do Not Forget The Workspace

Codex thread history and project files are separate.
Moving ~/.codex restores the Codex-side state, but it does not move your actual project folders. If a thread points to a workspace path, make sure that folder also exists on the new Mac.

For example:

mkdir -p ~/Documents/"Client Pursuit"

If your work lives in OneDrive, let OneDrive fully sync the relevant folders before expecting every file reference to work:

~/Library/CloudStorage/OneDrive-Slalom/Documents/"Client Pursuit"
-- which might be one of your many (manyⁿ) folders!

Sanity Check

After reopening Codex:

  1. Confirm the thread appears in the sidebar.
  2. Open it and check that recent messages are present.
  3. Confirm the workspace path exists.
  4. Reconnect any cloud connectors if prompted. Some connectors may show as installed but still require re-authentication. That is normal when moving machines.

Cleanup

After confirming the transfer worked, delete the archive from both machines:

rm ~/Desktop/codex-backup.tgz

The archive contains local Codex state and may include credentials, so do not leave it sitting around.

The Practical Summary

Back up ~/.codex, exclude the Git fsmonitor socket, restore it on the new machine, then make sure the referenced project folders are present.

That is enough to carry active Codex threads and local context across Macs.