dsh-codex-migrate
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Fail
- os.homedir — User home directory access in codex/dsh-codex-bridge/mcp/server.mjs
- process.env — Environment variable access in codex/dsh-codex-bridge/mcp/server.mjs
- network request — Outbound network request in codex/dsh-codex-bridge/mcp/server.mjs
- os.homedir — User home directory access in lib/bridge/codex-app-server.js
- process.env — Environment variable access in lib/bridge/codex-app-server.js
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Migrate Codex CLI conversations / MCP servers / memories into DeepSeek Harness | 把 Codex CLI 的对话、MCP、记忆迁移到 DeepSeek Harness
dsh-codex-migrate
Version 2.0 turns the plugin into a two-sided migration bridge. Import Codex tasks into DSH, or move one DSH conversation—or every active conversation in a project—into Codex. Every action is an explicit one-time import; the source conversation is never modified later by background synchronization.
What's new in v2.0
- Two-way one-shot imports: Codex → DSH and DSH → Codex both convert history into the target's structured conversation format instead of flattening everything into plain text.
- Continue in Codex: a native Codex action below DSH assistant replies imports the current conversation and opens the new Codex task.
- Continue in DSH: the bundled MCP server and
continue-in-dshSkill let a Codex user say “Continue in DSH” to import and open the current task in DSH. - Batch migration by project: import every unarchived conversation in a DSH project in one operation while preserving the original workspace path.
- Project-less Codex tasks: conversations without a Codex project are imported into the canonical
(no project)/codex-unprojectedworkspace. - MCP memory Beta:
remember_memory,search_memory, andforget_memoryprovide local persistent memories with global, project, and conversation scopes. - Three memory sources: independently import Codex Markdown memory, bridge MCP memory, and Memory Skill storage.
- Faster inventory refreshes: an incremental cache reparses only new or changed files and isolates corrupted sessions.
- Refined UI: simplified cards and lists, fixed live language switching, and consistent actions, badges, spacing, and dark/light styling.
Entry points
The Codex icon appears beside DSH's native copy and feedback actions:
- Select the Codex icon to import one DSH conversation and navigate to Codex.
- Open Settings → Codex Migration → Batch Migration by Project to import every unarchived conversation in a project.
- Say “Continue in DSH” in Codex to import the current Codex task and navigate to DSH.
Version 2.0 intentionally does not provide shared conversations, background bidirectional sync, conflict merging, or a Codex inline monitor. Each import is inspectable, repeatable, and cannot silently rewrite the same history on both sides.
Installation: configure both sides
The complete experience has two local components:
| Component | Installed in | Purpose |
|---|---|---|
dsh-codex-migrate |
DSH | Reads, converts, and creates DSH/Codex conversations; hosts the loopback-only handoff service |
dsh-codex-bridge MCP + Skill |
Codex | Provides “Continue in DSH,” MCP memory tools, and the trigger workflow |
The DSH plugin alone supports settings-page imports and DSH → Codex actions. Install the Codex companion as well to start imports from Codex or use MCP memory.
Requirements
- A working DeepSeek Harness installation.
- Codex desktop, Codex CLI, or the Codex IDE extension.
nodeavailable in the terminal; Node.js 18 or newer is recommended.- Commands below use the DSH
webprofile. Replacewebif you use another profile.
Step 1: install the DSH plugin
First installation:
dsh plugin --profile web add dsh-codex-migrate
Upgrade from an earlier version:
dsh plugin --profile web update dsh-codex-migrate
Restart DSH, then open Settings → Codex Migration. You should see Imported Conversations, Batch Migration by Project, and Memory Import.
Step 2: get the Codex companion
The MCP server and Skill are bundled in this repository, so keep the cloned directory available locally:
git clone https://github.com/polarskicpl/dsh-codex-migrate.git
cd dsh-codex-migrate
If you already cloned the repository, update it with git pull.
Step 3: register the MCP server in Codex
Windows PowerShell:
$bridge = (Resolve-Path ".\codex\dsh-codex-bridge\mcp\server.mjs").Path
codex mcp add dshCodexBridge -- node $bridge --stdio
macOS / Linux:
bridge="$(pwd)/codex/dsh-codex-bridge/mcp/server.mjs"
codex mcp add dshCodexBridge -- node "$bridge" --stdio
If the same MCP name is already registered with an old path, run this first and then repeat the add command:
codex mcp remove dshCodexBridge
Verify the registration:
codex mcp list
Codex also supports direct ~/.codex/config.toml configuration, but the CLI avoids path and TOML escaping mistakes. See the official Codex MCP documentation.
Step 4: install the continue-in-dsh Skill
Windows PowerShell:
$skills = Join-Path $HOME ".agents\skills"
New-Item -ItemType Directory -Force -Path $skills | Out-Null
Copy-Item -Recurse -Force ".\codex\dsh-codex-bridge\skills\continue-in-dsh" $skills
macOS / Linux:
mkdir -p ~/.agents/skills
cp -R ./codex/dsh-codex-bridge/skills/continue-in-dsh ~/.agents/skills/
Codex discovers user skills in ~/.agents/skills. Restart Codex if an updated skill does not appear immediately. See the official Codex Skill documentation.
Step 5: restart and verify
- Start DSH with the migration plugin enabled.
- Restart Codex and confirm that
dshCodexBridgeis connected in/mcp. - Confirm that
continue-in-dshappears in/skills. - Create a test Codex task and enter:
Continue in DSH. - DSH should open the imported conversation. The Agent confirms with:
已同步对话到 DSH。
The MCP server exposes four tools:
| Tool | Purpose |
|---|---|
continue_in_dsh |
Import the current Codex task once and open DSH |
remember_memory |
Save a local persistent memory |
search_memory |
Search memories in one scope |
forget_memory |
Delete a memory by ID |
Quick MCP memory Beta test
- In one Codex task, ask:
Use DSH MCP to remember that my test code is ocean-blue-728. - Open another Codex task and ask:
Search DSH MCP memory and tell me my test code. - After it returns
ocean-blue-728, ask it to forget that memory.
Memories are stored locally at ~/.codex/dsh-codex-bridge/memory.jsonl. They are not uploaded by this plugin and do not re-enable shared conversations.
Migrated content
| Content | Codex → DSH | DSH → Codex |
|---|---|---|
| User and assistant messages | ✓ | ✓ |
| Tool calls and tool results | ✓ | ✓ |
| Latest regenerated assistant reply | ✓ | ✓ |
| One conversation | ✓ | ✓ |
| Project-less conversations | ✓ | — |
| Batch import by project | ✓ | ✓ |
AGENTS.md and project text files |
Optional | — |
| Codex / MCP / Memory Skill memories | Optional | — |
DSH → Codex uses Codex's supported external-agent session import path. Every task in a project batch receives the same original working directory, while Codex remains responsible for sidebar organization.
Loading performance
The first refresh scans existing Codex sessions. Later refreshes reuse a size + mtime + hash incremental cache and parse only new or changed JSONL files. Removed files are dropped from the cache and corrupted files are isolated.
The cache lives under inventory/ in the migration output directory. Removing it only causes one full rebuild; it does not delete source conversations.
Key configuration
| Key | Default | Meaning |
|---|---|---|
codexDir |
'' |
Codex data directory; empty auto-detects ~/.codex |
outputDir |
'' |
Migration output; empty uses <DSH_HOME>/codex-sync |
language |
en |
en, zh, or auto to follow the UI locale |
sessionMode |
new |
all, new, or selected |
projectMode |
all |
all or selected |
includeMemories |
true |
Import Codex Markdown memory |
includeMcpMemories |
true |
Import bridge MCP persistent memory (Beta) |
includeMemorySkill |
true |
Import Memory Skill storage |
importAsDshSessions |
true |
Create native DSH sidebar conversations |
bridgeEnabled |
true |
Enable the loopback-only one-shot handoff service |
Security boundary
- The DSH handoff service binds only to
127.0.0.1. - Mutations require a generated installation token; the token is never stored in this repository.
- Disabling the DSH plugin also stops the handoff service.
- MCP memory stays local and does not automatically send raw project files or complete conversations to third-party services.
- The plugin writes only to the configured
outputDir, DSH session storage, and the local MCP memory file.
Development and release checks
npm run build
npm test
npm run test:bridge
npm pack --dry-run
See CHANGELOG.md for release history.
MIT
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found
