Plugin directory / Knowledge / dsh-plugin-codex-import
dsh-plugin-codex-import
Verified · install-tested on dsh Gordonynh
What it does
DeepSeek Harness plugin: import OpenAI Codex conversation history into DSH sessions via /codex-import | Use /codex-import to import Codex history into DSH.
Works — verified, early-stage project
DeepSeek Harness plugin: import OpenAI Codex conversation history into DSH sessions via /codex-import | Use /codex-import to import Codex history into DSH. It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
dsh-plugin-codex-import
English | 中文
A DeepSeek Harness plugin
that imports your OpenAI Codex conversation history into DSH sessions —
grouped into project workspaces, resumable, searchable, forkable — from a
single slash command.
/codex-import
Imported 679 session(s) from /Users/you/.codex.
Scanned 681, already present 0, failed 0.
Content: 10694 turns, 81513 steps, 13580 user messages, 81513 assistant messages, 101215 tool calls.
Grouped 529 session(s) into 116 workspace(s).
Reload the interface to see the imported sessions.
Install
dsh plugin --profile web add github:Gordonynh/dsh-plugin-codex-import
Then add it to your profile's ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: codex-import
name: 'dsh-plugin-codex-import'
Restart the harness. Verify it composed withdsh --profile web --dump-config | grep codex-import.
Usage
| Command | Effect |
|---|---|
/codex-import |
import every not-yet-imported Codex session |
/codex-import --dry-run |
report what would be imported, write nothing |
/codex-import --limit 20 |
stop after 20 sessions |
/codex-import --since 30 |
only sessions from the last 30 days |
/codex-import --project ~/work |
only sessions whose cwd is under a path |
/codex-import --archived |
also scan ~/.codex/archived_sessions |
Re-running is safe: already-imported session ids are skipped, and Codex
originals are never modified.
Configuration
- insert:
- id: codex-import
name: 'dsh-plugin-codex-import'
config:
codexHome: '~/.codex' # default: $CODEX_HOME, else ~/.codex
provider: 'codex' # recorded on imported assistant messages
groupIntoWorkspaces: true # attach imported sessions to workspaces
How the mapping works
Codex (rollout-*.jsonl) |
DeepSeek Harness session events |
|---|---|
session_meta |
session header (id, createdAt, cwd) |
user message (human) |
user/message, source:{kind:"user"} |
injected context / developer role |
user/message, source:{kind:"plugin",plugin:"codex-import"} |
reasoning |
reasoning block on assistant/message |
assistant message / agent_message |
text block on assistant/message |
function_call / custom_tool_call |
tool-call block + tool/call event |
*_output items |
tool/result, call-id matched within the step |
web_search_call / tool_search_call / image_generation_call |
balanced tool/call + tool/result pair |
turn_context.model |
AssistantMessage.source.model |
| first human prompt | session/title event (no auxiliary model call) |
event_msg telemetry, ghost_snapshot, token counts |
dropped (UI duplicates) |
Codex records a flat item stream; the harness wants it bracketed intoturn/start → (user/message | step/start … step/end)* → turn/end. The plugin
rebuilds that structure using Codex turn_id stamps where present, and human
message boundaries otherwise.
Storage is the harness's own. Sessions are written throughctx.sessionPersistence.create() / .append() and grouped throughctx.workspaceRegistry.create() / workspace.attachSession(). The plugin
never touches the session directory, the zstd container, or the workspace
registry file — physical encoding, path layout, durability, and workspace
accounting all stay where they belong, so a harness format change cannot
silently desync this plugin.
Repairs applied during conversion: dangling tool calls get a synthetic error
result (TOOL_NOT_STARTED) so no assistant message carries an unanswered
call; orphan tool outputs are dropped; non-JSON custom-tool input is wrapped
as {"input": …} so tool/call.arguments stays parseable; images become a
text placeholder (harness image blocks need attachment-service references a
plugin cannot mint); Codex-compacted sessions import their full
pre-compaction history.
Sessions whose project directory no longer exists are imported but stay
ungrouped — a workspace must point at a real directory, which is the
harness's own rule.
Verification
node test/verify.mjs # grammar, argument parsing, mapping edges,
# + folds every real rollout through the harness
node test/integration.mjs # boots real dsh-session, persistence and workspace
# plugins in a scratch root and imports through them
verify.mjs runs the harness's own foldSurface / deriveEventMessage — the
exact reconstruction path a resumed session uses. integration.mjs proves the
harness's real persistence accepts the headers and event batches this plugin
produces, and that the workspace registry accepts the resulting sessions.
On the author's machine: 679 real sessions, 196k+ reconstructed messages, zero
failures.
Caveats
- DSH is in developer preview and pins its session format at version 0 with
no compatibility promise. If a future harness refuses v0 logs, re-run
the import — Codex originals are untouched. - Resuming an imported session sends its history to whatever model DSH has
configured; provider-specific replay state is not carried over. - Requires Node ≥ 22 (the harness's own floor).
License
Source-available under a custom license — not an OSI-approved open-source
license. Summary (the license texts control):
| Who | Rights |
|---|---|
| Everyone | free noncommercial use, modification, redistribution (same license, keep notices) |
| Individuals, worldwide | additionally: commercial use |
| DeepSeek & its partner enterprises | additionally: commercial use, closed-source/proprietary derivatives, sublicensing — see the supplement |
| Other organizations | noncommercial only; commercial use requires a separate license from the author |
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-plugin-codex-import for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
Web profile:
dsh plugin --profile web add github:Gordonynh/dsh-plugin-codex-import Headless (CLI) profile:
dsh plugin --profile headless add github:Gordonynh/dsh-plugin-codex-import Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.
When to use it
Give the agent a memory, a knowledge base, or a retrieval layer so it stops forgetting context between sessions.
Who it's for
Users running long projects who want the agent to remember decisions, docs, and preferences without re-explaining.
For developers — extending it
The memory/retrieval backend is the seam — plug a new store, tune what gets distilled, or add citation and audit trails.