Foreword¶
When working on projects in OpenAI Codex, you often accumulate three types of assets: conversation history organized by workspace, custom Skills stored under ~/.codex/skills, and the MCP toolchain configured in ~/.codex/config.toml. When switching to DeepSeek Harness (DSH), common issues include incompatible session formats, needing to configure Skills and MCP separately on both sides, migration scripts that often only support one-way copying, and difficulty bringing back conversations continued in DSH to Codex.
dsh-codex-sync (maintained by Walvez, GitHub repo Walvez/dsh-codex-sync) is not positioned as a one-time migration tool but as a continuous bidirectional bridge between Codex and DSH. It is classified as a “workflow” in the DSH plugin marketplace, currently at npm package version 1.5.7, licensed under MIT, and requires Node.js >= 20.
What Is This¶
In a nutshell: dsh-codex-sync provides bidirectional import and export of project-level conversations between Codex and DSH, mounts ~/.codex/skills in real-time to the DSH Skills directory, automatically mirrors mcp_servers configuration, and allows installing a reverse MCP on the Codex side to search for and install DSH plugins.
Core Features¶
Bidirectional Project Conversation Sync¶
Importing from Codex to DSH
- Browse Codex sessions grouped by workspace folders;
- Preserves user prompts, assistant outputs, reasoning traces, and tool call records;
- Automatically associates imported sessions with matching DSH workspaces for easy conversation continuation;
- Supports incremental re-import: new turns on the Codex side are marked as
updated, appending only new content without recreating sessions.
Exporting from DSH to Codex
- Exports DSH native conversations or continuations back to Codex;
- Automatically matches Codex workspace directories; unknown directories are locked to prevent orphaned threads;
- Creates standalone Codex rollouts and SQLite indexes with
history_mode: legacy, without overwriting existing Codex history; - Viewable and continuable after restarting the Codex application.
Sub-Agent Threads
- By default, hides internal sub-agent threads to keep the list concise;
- Can be expanded on demand, exporting sub-agents nested under their parent thread separately.
Real-time Skills Mounting¶
- Directly registers
~/.codex/skills/*/SKILL.mdinto the DSH native Skills directory; - Supports nested directories and multi-file Skill packages;
- Modifications to Skill files on disk take effect in the next conversation round without restarting.
Bidirectional MCP Mirroring¶
- Codex → DSH: Monitors
~/.codex/config.tomland dynamically mirrors[mcp_servers.*]to DSH, with conflict avoidance and stderr silencing; - DSH → Codex: Registers
[mcp_servers.dsh-plugins]on the Codex side vianpx dsh-codex-sync codex-install, enabling the Codex Agent to search, view, and install DSH plugins.
Native UI within DSH¶
- Provides a Codex quick-access entry next to the workspace title (adaptive positioning when the sidebar expands/collapses);
- Centered settings panel with operation cards, toggle states, and Chinese/English switching;
- Styling uses DSH design tokens (
--dsw-alias-*).
Built-in Agent Skill¶
The plugin includes a codex-sync Skill, allowing the DSH Agent to execute sync tasks on your behalf, such as:
- Dry-run import:
/import-codex --dry-run - View MCP mirror status:
/mcp-status - Enable auto-import:
/auto-import on
Installation and Enablement¶
Recommended installation via the DSH plugin marketplace:
dsh plugin --profile web add dsh-codex-sync
Alternatively, manually insert in the profile’s cordis.patch.yml:
- insert:
- id: codex-sync
name: dsh-codex-sync
config:
maxSkills: 30
mcpMirrorDeny:
- node_repl
mcpMirrorSilent:
- exa
Optional: Configure reverse MCP bridging on the Codex side.
# Register [mcp_servers.dsh-plugins] in ~/.codex/config.toml
npx dsh-codex-sync codex-install
# Run health check
dsh-codex-sync doctor
Typical Usage¶
After installation, click the Codex icon in the sidebar to open the sync settings panel. Common operations and configuration items are as follows:
| Section | Item | Command / Config Key | Description |
|---|---|---|---|
| Actions | Import from Codex | /import-all |
Opens the project selector to import sessions into DSH |
| Export to Codex | /export-codex |
Exports DSH conversations as Codex copies | |
| Mirror Status | /mcp-status |
Views MCP server health and status | |
| Refresh Status | /codex-settings |
Re-syncs toggle states from the host | |
| Features | Import Commands | enableImport |
Enables the /import-codex slash command family |
| Auto-import | autoImport |
Automatically imports new Codex sessions on startup | |
| Instruction Injection | enableInstructions |
Injects instructions.md / AGENTS.md into prompts |
|
| Config Summary | enableConfig |
Injects a summary of config.toml model settings into prompts |
|
| Skills | enableSkills |
Registers ~/.codex/skills as DSH Skills |
|
| MCP Mirror | mcpMirror |
Automatically mirrors [mcp_servers.*], taking effect immediately |
Here is a common workflow:
- Install the plugin and open the sidebar Codex settings, enabling
enableSkillsandmcpMirror; - Execute
/import-all, selecting Codex sessions to migrate into DSH by project; - Continue development in DSH; when you need to return to Codex, execute
/export-codex; - To manage DSH plugins in Codex, run
npx dsh-codex-sync codex-installto complete the reverse bridge.
Use Cases and Notes¶
Who is it for
- Users switching between Codex and DSH who need to preserve conversation context;
- Those who have already configured Skills and MCP in Codex and don’t want to maintain them separately in DSH;
- Those who want content continued in DSH to be safely exported back to Codex without overwriting original history.
Notes before use
- The plugin runs with the permissions of the current DSH process and reads configurations, Skills, and session data under
~/.codex/. Before installation, read the GitHub source code and confirm the MIT license terms. - The community directory SkillHub is an independent site with no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem follows the “everything is a plugin” philosophy, and this plugin is a workflow-type extension within it.
- Exporting to Codex creates new rollout copies without modifying existing Codex sessions; import supports incremental updates, but it’s recommended to preview with
/import-codex --dry-runbefore first use.
Summary¶
dsh-codex-sync bridges the gap between Codex and DSH into a sustainably maintainable pathway: conversations can be moved bidirectionally, Skills and MCP can sync in real-time with disk configuration, and the Codex side can even search for DSH plugins via reverse MCP. If you’re evaluating migrating from Codex to DSH or need to switch between the two environments, install the plugin from the marketplace and use the import dry-run in the settings panel to confirm the effect first.
- Community Directory: https://www.skillhub.cn/plugins/Walvez/dsh-codex-sync
- GitHub: https://github.com/Walvez/dsh-codex-sync