Introduction

The design philosophy of DeepSeek Harness (hereinafter referred to as DSH) is “everything is a plugin,” and model inference is also handled by provider plugins. If you are already logged into Codex CLI locally and wish to directly select the models and reasoning intensity exposed by your Codex native account within a DSH session, rather than manually transferring context between two sets of tools, you need a bridge layer. The @necokeine/dsh-codex-relay introduced below is the plugin that does exactly this.

What is this

dsh-codex-relay is a DSH model provider plugin maintained by necokeine, falls under the model inference category, current version 0.1.2, license MIT. It reads the models available to the current Codex account via the local codex app-server --stdio JSON-RPC interface and hands over each model request to the native Codex agent loop.

A key design: Codex’s tool calls, command execution, and file modifications are all completed within the native Codex turn. DSH does not send its own tool schema to Codex, nor does it execute tool calls that Codex has already completed; it only records the request and the final answer.

Prerequisites

Before installation, confirm three things:

  1. Node.js ^22.19.0 or >=24.0.0
  2. DeepSeek Harness 0.1.1-rc.2
  3. Logged into Codex CLI locally

The plugin uses binaries provided by dependency packages and does not rely on other codex versions in the PATH.

Installation & Enablement

Install from npm: add the plugin first, confirm configuration, then start:

dsh plugin --profile default add @necokeine/dsh-codex-relay
dsh --profile default --dump-config
dsh --profile default

The first command adds the plugin to the default profile; the second dumps the configuration to verify the plugin is loaded correctly; the third starts DSH.

If installing from source, clone the repository and install dependencies first, then add the local directory to the profile:

git clone https://github.com/necokeine/dsh-codex-relay.git
cd dsh-codex-relay
pnpm install
dsh plugin --profile default add "$PWD"
dsh --profile default --dump-config
dsh --profile default

When installing from source, the local directory uses pnpm link:, so it does not install dependencies in place of the source directory, and the prepare script generates lib/ simultaneously. Note that when installing from a Git repository, pnpm will require explicit permission for the package’s prepare build script; when published to npm or using a tarball generated by pnpm pack which carries pre-built lib/, no build is needed during installation.

The plugin’s package.json declares adding cordis.patch.yml to the profile via dsh.bundle. This layer uses the stable line ID llm-codex: if the current DSH version has a built-in prototype line with the same name, the plugin layer will replace it; otherwise, it will be inserted directly.

Select Model

After starting the Web interface via the steps above, go to the Model Settings page, select Codex, and then select the models and reasoning intensity exposed by the Codex native account. The model selector in the session will also show the Codex option.

Configuration

Plugin settings are saved in the dsh-codex-relay namespace, with defaults as follows:

dsh-codex-relay:
  permissionMode: inherit
  disposeGraceMs: 3000
  env: {}
  • permissionMode: inherit (default), never, approve-for-me, or dangerously-bypass-approvals-and-sandbox
  • disposeGraceMs: Grace period for terminating the Codex app-server process tree, in milliseconds
  • env: Environment variables explicitly passed to the Codex subprocess; native login and account status are still managed by Codex home
  • retryPolicy: DSH LLM provider’s failure retry policy

The four values of permissionMode behave differently. inherit determines Codex permissions based on the real-time approval policy of each DSH session:

  • When the DSH interface is ask, Codex uses workspace-write and approvalPolicy: on-request. Command sandbox elevation, additional file writing, and permission expansion requests enter the same DSH approval interface; a single allow maps to a single Codex accept, not silently upgraded to authorization for the entire session. This way, operations like git commit creating .git/index.lock which require elevated permissions can be approved by the user.
  • When the DSH interface is never, Codex can still write files in the normal workspace, but all operations requiring elevated permissions will be rejected, and no approval popup will appear.

The remaining three values are plugin-level overrides: never permanently denies elevation; approve-for-me hands it over to the native Codex auto-reviewer; dangerously-bypass-approvals-and-sandbox disables sandbox and interactive approval, which carries the highest risk and should only be used in isolated and fully trusted workspaces.

Additionally, session-title and compaction auxiliary requests do not inherit normal session permissions and always force the use of approvalPolicy: never and sandbox: read-only, and require Codex not to use tools or modify external state.

How it works

Every directory read or model invocation starts a temporary app-server process. Model invocations create an ephemeral Codex thread in the current DSH Session’s working directory, injecting persistent user/assistant history, and then executing a native Codex turn. The plugin waits for the terminal notification and only converts the final answer into a DSH text block; it terminates and waits for the entire subprocess tree to exit after completion, failure, or cancellation.

The plugin uses a fixed bridge instruction:

You are running as the selected Codex model provider inside DeepSeek Harness. Use only your native Codex tools and agent loop. Do not emit DeepSeek Harness tool calls; the host records your final answer.

Known Limitations

Four points need to be understood before use:

  • Currently, only text input is declared to DSH; images will be projected into stable placeholder hints before the call.
  • The plugin outputs the final text only after waiting for the Codex terminal notification, and does not project incremental text or token usage.
  • Codex native tool trajectories are not converted into DSH tool/call and tool/result events; the DSH Session records the request and the final answer, not the private Codex trajectory.
  • temperature, maxTokens, stop, and DSH tool schema are not mapped to this integration.

If you need the complete tool trajectory or streaming output on the DSH side, this plugin currently does not satisfy these requirements.

Use Cases & Notes

This plugin is suitable for users who have logged into Codex CLI, want to directly select Codex models and reasoning intensity in DSH, and can accept a recording method where “tool calls stay on the Codex side, and the host only records the final answer.”

Please note: The plugin runs with the permissions of the current dsh process. You should review the source code and license before installing. The community directory (skillhub.cn) is an independent site with no official affiliation with DeepSeek or Fangmatrix; it is recommended to review code before installing any third-party plugins. Also, dangerously-bypass-approvals-and-sandbox disables sandbox and interactive approval and should only be used in isolated and fully trusted workspaces.

Summary

dsh-codex-relay integrates the model capabilities of a native Codex account into DSH in the form of a standard provider plugin: after installation, you can select it on the Model Settings page, and permission models can be precisely controlled via permissionMode, with tool calls completely staying within the native Codex turn. The trade-off is that DSH cannot see the tool trajectory and incremental output, making it suitable for usage centered on the final answer.

  • Directory: https://www.skillhub.cn/plugins/necokeine/dsh-codex-relay
  • GitHub: https://github.com/necokeine/dsh-codex-relay