๐Ÿ” Codex2DSH

August 28, 2026 ยท View on GitHub

๐Ÿ” Codex2DSH

Migrate your Codex (OpenAI Codex CLI / Desktop) MCP servers, skills, global instructions, memories and session history into DeepSeek Harness (DSH) โ€” fully visual, no CLI required.

npm version npm downloads CI License: MIT Node.js >= 22.19

็ฎ€ไฝ“ไธญๆ–‡ ยท English

One-liner: Your Codex configuration is an asset, not a cage. codex2dsh "translates" your accumulated MCP servers, skills, global rules, memories and session history into native DSH form โ€” with read-only sources, secrets migrated as-is by default, dry-run previews, and human confirmation.

โœจ Features

CapabilityEntry pointWhat it does
๐Ÿ–ฅ๏ธ Visual migration panelSettings โ†’ Plugins โ†’ Codex MigrationStatus overview + migration options + 4-step guided wizard + per-category cards + result badges
MCP mirrorPanel MCP card / migrate_codex_mcpParse [mcp_servers.*] from config.toml โ†’ mergeable DSH MCP client YAML; secrets migrated as-is by default (optional masking); include/exclude filters; local tool directories (e.g. mcp-toolbox) moved along and paths rewritten
Skills conversionPanel skills card / migrate_codex_skills~/.codex/skills/<name>/SKILL.md โ†’ DSH skill assets (frontmatter adapted, kind: dsh), scripts co-migrated, idempotent with conflict disambiguation; prefix-based bulk exclusion (e.g. ccpanes-)
Global instructionsPanel instructions card / migrate_codex_instructionsAGENTS.md / instructions.md โ†’ $DSH_HOME/AGENTS.md (the only user-global instructions file DSH reads); Codex-specific references auto-adapted (tool paths rewritten, MCP prefix normalized, unconfigured MCP references warned)
Migration verificationPanel checkup card / codex2dsh_verifyRead-only "is it actually usable in DSH" check: mirror merged into profile? commands/config paths exist? AGENTS.md references hold up?
Memory migrationPanel memory card / migrate_codex_memoryCodex memories (incl. read-only sqlite probe) โ†’ DSH memory assets
Memory import to dsh-mnemoncodex2dsh_import_memory / CLI memory-importImport migrated Codex memories into dsh-mnemon (global memory engine, ~/.mnemon): Runtime layer distills memory_summary.md into per-turn injected USER/MEMORY entries; Documents layer imports the full memory files (searchable)
Config suggestionsPanel config card / migrate_codex_configModel / Provider / permissions / project trust โ†’ read-only suggestion snippet (never touches settings.yaml automatically)
Session importPanel sessions card / migrate_codex_sessionsDelegates to dsh-chat-import (import_chat, format: 'codex') for continuable sessions
Session title backfillPanel "Fix titles" / codex2dsh_fix_titlesChinese titles lost after import (shown as workspace names): backfill from ~/.codex/session_index.jsonl thread_name or the first real question in the rollout (append-only, idempotent, live sessions skipped)
Bad title repairCLI codex2dsh repair-titlesFix 0.1.1-era broken session/title events (SessionPersistenceCorruptionError); truncation-style fix, zero data loss
Workspace regroupingPanel "Organize workspaces" / codex2dsh_regroup_sessionsCodex non-workspace sessions each got their own workspace after import: unify header.cwd and move log dirs into a single DSH workspace (authoritative via projectless-thread-ids)
Migration doctorPanel checkup card / codex2dsh_doctorPer-asset status: migrated / pending / unmigratable / secret residue
CLIcodex2dshSame capabilities without a GUI: preview / mcp / skills / instructions / memory / config / sessions / titles / repair-titles / regroup / doctor / ledger

๐Ÿ“ฅ Install

Requirements: Node.js โ‰ฅ 22.19 ยท DeepSeek Harness โ‰ฅ 0.1.x ยท an existing Codex config (~/.codex/)

# DSH Desktop users (desktop profile):
dsh plugin --profile desktop add codex2dsh

# dsh CLI / Web profile users:
dsh plugin --profile web add codex2dsh

Restart DSH, then open Settings โ†’ Plugins โ†’ Codex Migration.

Uninstall: dsh plugin --profile <name> remove codex2dsh โ€” migrated assets are never deleted.

๐Ÿš€ Quick start

  1. Open the panel, check the status overview (source root, asset list, secret warnings).
  2. Click Start full migration โ†’ the 4-step wizard runs preview โ†’ select โ†’ execute โ†’ done.
  3. Review generated artifacts (e.g. mcp-mirror.cordis.yml) and merge the - insert: blocks into your profile's cordis.patch.yml (see FAQ), then restart DSH.
  4. Optional: use the per-category cards for fine-grained selection (e.g. keep only google-mcp-toolbox; exclude skills by prefix like ccpanes-).

CLI equivalent:

codex2dsh preview                      # read-only preview of all assets
codex2dsh mcp --apply                  # generate MCP mirror (secrets as-is; --mask-secrets to mask)
codex2dsh skills --apply --exclude ccpanes-*
codex2dsh titles                       # preview title backfill
codex2dsh repair-titles --apply        # fix broken title events (restart DSH after)
codex2dsh regroup --apply              # regroup non-workspace sessions (restart DSH after)
codex2dsh doctor                       # migration health check
codex2dsh ledger                       # migration ledger

๐Ÿ”’ Security

  • Read-only sources: files under ~/.codex/** are never written, moved or deleted.
  • Secrets migrated as-is by default so migrated configs work immediately โ€” artifacts contain real credentials, never commit them to a public repo; the panel can switch to masking (****) in one click.
  • Credential files untouched: auth.json etc. are only reported as existing, never read or migrated.
  • Dry-run first: every write operation defaults to preview until you confirm.
  • No automatic profile edits: MCP / config generate reviewable snippets only; merging is always manual.
  • Idempotent, no overwrite: existing targets with different content are refused unless force.

โ“ FAQ

How do I actually get the migrated MCP servers working in DSH? Migration produces a review snippet (~/.dsh/codex2dsh/mcp-mirror.cordis.yml). Merge the - insert: block into your profile's cordis.patch.yml (~/.dsh/profiles/<profile>/cordis.patch.yml), then restart DSH.

Which profile should I install to? The currently active profile shown in DSH Desktop settings (usually desktop or web). dsh plugin --profile <active> add codex2dsh.

Where do migrated assets land? Skills โ†’ ~/.agents/skills/<name>/ ยท instructions โ†’ $DSH_HOME/AGENTS.md ยท memories โ†’ ~/.dsh/memories/codex/ (+ ~/.mnemon via dsh-mnemon import) ยท MCP mirror & ledger โ†’ ~/.dsh/codex2dsh/.

Imported session titles lost / shown as workspace names? import_chat writes no session/title event, so DSH falls back to the first user message โ€” which in Codex rollouts is usually a harness injection. Fix: panel Sessions โ†’ Fix titles (or codex2dsh_fix_titles), titles taken from thread_name or the first real question; append-only and idempotent.

Session won't open, SessionPersistenceCorruptionError: ... is not surface-eligible ...? A 0.1.1-era backfill bug wrote session/title with a surfaceOp. Run codex2dsh repair-titles --apply outside DSH, restart DSH, then re-run "Fix titles".

๐Ÿ“š Docs

DocContent
01-ArchitectureGoals, DSH plugin system, tech stack
02-Codex AnatomyCodex config anatomy (config.toml / skills / memory / credentials)
03-Mapping SpecPer-asset mapping rules
06-Tests & AcceptanceTest strategy & acceptance matrix
09-Security BoundarySecurity promises & secret policy

๐Ÿค Contributing & Thanks

  • Bugs / ideas โ†’ Issues ยท development โ†’ CONTRIBUTING.md ยท changelog โ†’ CHANGELOG.md
  • Open-source projects referenced by this plugin (no runtime deps, optional cooperation / target platform / format contracts):
    • dsh-chat-import โ€” session import delegation (import_chat)
    • dsh-mnemon โ€” global memory engine for memory import
    • DeepSeek Harness โ€” plugin host platform & @deepseek-ai/dsh-mcp-client contract

๐Ÿ“„ License

MIT โ€” see LICENSE.

โš ๏ธ Disclaimer: this plugin only "translates" configuration. It does not assume responsibility for target servers, credentials or access-policy compliance. Read docs/09-ๅฎ‰ๅ…จ่พน็•Œ.md before migrating MCP configs that contain secrets.