Introduction

The philosophy of DSH is “everything is a plugin”; the community directory is an independent site with no official affiliation to DeepSeek / Fangzhuan. For developers using both OpenAI Codex CLI and DSH, a common requirement is to import the history of Codex CLI conversations into DSH so they can be browsed, searched, and continued. dsh-codex-import provides this import path.

What is this

dsh-codex-import is a DSH plugin, available at repository G1en-114/dsh-codex-import, licensed under MIT.

It imports OpenAI Codex CLI conversation history into DeepSeek Harness (DSH), converting it into a browsable, searchable, and continueable DSH session that appears in the corresponding workspace sidebar.

It comes in two forms:

  • Hosted plugin command
  • Standalone CLI

Core Capabilities

The capabilities verified below are introduced.

  • Supports executing /codex-import <session-id> within DSH to import Codex CLI historical sessions as DSH sessions.
  • Preserves user messages, assistant replies (commentary + final_answer), tool calls and outputs, turn/step structure, and session titles during import.
  • Zero runtime dependencies; uses Node >= 22.20 built-in node:zlib zstd support to write DSH standard session files.
  • Performs self-validation after writing: double-frame zstd, header as a separate frame, continuous seq, and includes a checksum.
  • For very large sessions, automatically compresses the oldest turn into a summary checkpoint; supports pure truncation with --max-turns.
  • Codex rollout does not save web_search_call output, so it is omitted during import.

Installation and Enabling

When installing as a DSH plugin, use the following command:

dsh plugin --profile web add git+https://github.com/G1en-114/dsh-codex-import.git

This command adds the plugin to the web profile.

When installing via git, pnpm intercepts the prepare script; you need to add the package name to the allowBuilds field in the configuration file below as prompted by the error, then rerun the installation command:

~/.dsh/profiles/web/pnpm-workspace.yaml

After installation is complete, restart dsh web or refresh the page.

When running as a standalone CLI, the Node version requirements are as follows:

Node >=22.20

The plugin command form runs within the DSH process; the README states there is no such restriction.

Typical Usage

In a DSH session, you can import using a session-id:

/codex-import 019feec0-f565-7900-b985-1d6ba3b63a56

If you already have a rollout file, you can also import it by specifying a session ID and workspace context:

/codex-import ~/rollout.jsonl --session-id session-my-import --cwd /mnt/e/cell

If you only want to retain the most recent turns, you can use:

/codex-import 019feec0-... --max-turns 80

Standalone CLI examples are as follows. --dry-run is for a dry run, and --compact is for compressing the oldest turn when the budget is exceeded:

dsh-codex-import --dry-run 019feec0-...
dsh-codex-import --compact 019feec0-...
dsh-codex-import ~/backup/rollout-2026-08-11.jsonl --cwd /mnt/e/cell

--compact requires the DEEPSEEK_API_KEY environment variable or the credentials file below:

~/.dsh/.credentials.yaml

Handling Large Sessions

After the import is complete, every subsequent conversation will be billed based on the full history input tokens; automatic compression will compress the oldest turn into a summary checkpoint, which consumes a one-time token.

If you only need to keep the part that can be continued recently, it is recommended to use --max-turns for pure truncation; only consider automatic compression when you really need early context.

Use Cases and Notes

  • Suitable for developers who have Codex CLI historical sessions and wish to continue browsing, searching, and conversing in DSH.
  • The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing. The current license is MIT.
  • Re-importing the same Codex session will generate a new session ID; specifying the same --session-id will result in an error.
  • package.json declares the following peerDependencies:
@deepseek-ai/cordis
@deepseek-ai/dsh-commands
@deepseek-ai/dsh-session-persistence
  • After installation, you need to restart dsh web or refresh the page.

Conclusion

Following the steps above, dsh-codex-import can convert Codex CLI historical sessions into DSH sessions that can be continued, while preserving message structures, tool calls, turn/step, etc.

GitHub repository:

https://github.com/G1en-114/dsh-codex-import

The directory page link was not confirmed in the provided materials; you can search for dsh-codex-import in the DSH community directory.