A way to sync sessions between a PC and laptop is now available for OpenAI Codex
A simple but frustrating issue has surfaced in OpenAI Codex: sessions, history, and context do not carry over between devices. For those who alternate…
AI-processed from Habr AI; edited by Hamidun News
OpenAI Codex currently lacks built-in cross-device synchronization, so switching from a home PC to a laptop can disrupt your work rhythm. The user-created tool codexSync offers a practical workaround: instead of syncing "Codex in the cloud," it transfers its local state through a dedicated sync folder.
Why this is a problem
The issue manifests quickly if you work with Codex in two common scenarios: at your main computer and on the go. Over time, the assistant accumulates conversations, intermediate states, notes, summaries, and project context. All of this remains tied to a specific device. As a result, a task started on one computer doesn't continue seamlessly on another: you can't simply pull the history, merge it, or properly clean it up, except through primitive archiving.
Start a task on PC → can't continue on laptop.
According to the author's observations, the reason lies in how Codex stores its working state locally—in session files, auxiliary data, and possibly SQLite. This approach has obvious advantages: speed, autonomy, and privacy. But the flip side is the absence of a proper multi-device scenario. For a single machine, this is nearly unnoticeable; for those constantly switching between a workspace and travel, it becomes a real productivity constraint.
How the workaround works
The solution doesn't try to break Codex itself or inject into its internal logic. Instead, it proposes syncing the state folder between devices and working on top of the existing storage model. For this, the author built a small CLI utility called codexSync. It doesn't manipulate data deeper than necessary and uses a shared directory, which can be cloud storage, a NAS, or any other accessible folder.
- automatically finds the necessary Codex directories
- synchronizes sessions and associated auxiliary files
- supports config verification, change planning, and dry-run mode
- allows you to manually pull state before work and push changes after
The initial setup is straightforward: first, you create a config with paths to the .codex directory and the sync folder, then the utility validates the settings, shows the plan, and optionally runs a trial without writing. The work cycle is equally direct: before starting a session, you pull the current state, and after finishing, you push the changes back. This mode doesn't provide real-time magic, but it solves the basic portability problem.
Where the limits are
Importantly, this is not an official OpenAI feature and not full real-time synchronization. To avoid damaging the state, Codex must be completely closed before syncing, including background processes. If the app remains running, the sync script shouldn't start; the author even added logic that suggests terminating a stuck process. This makes the tool more of a disciplined work procedure than an invisible background service.
At first glance, you might ask why a separate utility is needed if you can just put the folder in Dropbox, OneDrive, or another cloud drive. But that approach has too many weaknesses: file conflicts, unpredictable states, lack of transparent change planning, and risk of corrupting the local database. codexSync adds a layer of control where a regular cloud folder only provides crude synchronization without understanding what exactly will be overwritten now.
Currently, the tool still needs testing on different configurations, especially on macOS ↔ macOS and macOS ↔ Windows combinations. This is an important detail: the idea itself looks universal, but the behavior of paths, file locks, and background processes can differ from system to system. So for now, the project looks more like a useful open-source tool for advanced users than a solution you can unconditionally recommend to all Codex owners.
What this means
The codexSync story shows a simple fact: around AI tools, a layer of user infrastructure quickly appears, closing gaps in official products. If OpenAI doesn't add native synchronization to Codex, such external utilities will become the standard way to maintain continuous work across devices.
Want to stop reading about AI and start using it?
AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.