relay-dsh-plugin-codex
Codex integration plugin for DeepSeek Harness, providing native Codex conversations powered by the Codex App Server, with workspace, terminal, approval, and DSH tool support.
- Stars
- 1
- Language
- JavaScript
- Created
- Aug 23, 2026
- Updated
- Aug 26, 2026
Introduction
Codex Conversations for DeepSeek Harness
English | 中文
npm package: relay-dsh-plugin-codex
· All Relay DSH plugins
Real npm-installed demo on official DSH: live Codex and Claude replies, a workspace file preview, and an executed terminal command. Watch the H.264 MP4.
relay-dsh-plugin-codex adds Codex as a conversation backend to the
official DeepSeek Harness
(DSH) Web UI. After installation, Codex appears in DSH's New Session mode
menu. One DSH Session is bound to one Codex App Server Thread.

The screenshot was captured from official DSH 0.1.1-rc.2 with the Codex and
Claude plugins installed. If you install only this plugin, only Codex is
added.
Do I Need This Plugin?
Install it when you want to:
- use Codex inside DSH instead of switching to a separate Codex interface;
- keep DSH's native conversation history, composer, approvals, and questions;
- let one DSH Session continue the same Codex App Server Thread across turns;
- use Codex models, reasoning effort, images, interruption, and DSH-contributed tools in the same conversation.
You do not need it to use DSH's standard agents. It also does not add Relay Events, file browsing, or a terminal panel. Those are separate optional plugins.
Quick Start With Official DSH
The steps below were validated with:
- DeepSeek Harness
0.1.1-rc.2, commitb150a551 - Node.js 22.13 or newer
pnpmavailable onPATH
DSH is currently a developer preview and may introduce compatibility-breaking changes. This repository tracks official releases and records its tested version here.
1. Prepare Codex authentication
The plugin installs a pinned official @openai/codex runtime and launches it in
App Server mode. The runtime contains native binaries for macOS, Windows, and
Linux on x64 and arm64, so DSH does not need to find a codex command on its
PATH.
Codex authentication is still required. Install or open an official Codex client and authenticate it before starting your first DSH Codex session. When using the CLI, verify the shared local credentials with:
codex --version
codex login
See the official Codex CLI guide and
authentication documentation for
installation and sign-in options. Credentials stay under Codex's normal local
authentication mechanism; this plugin does not collect them. Installing this
plugin supplies its App Server runtime, but does not add a global codex shell
command.
2. Choose a package source and install
Stop a running DSH Web process before changing Profile bundles. Choose one of the following sources.
Stable npm release
The published npm package name is
relay-dsh-plugin-codex.
Use @latest to install the current stable release:
npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-codex@latest
At the time of writing, latest resolves to stable version 0.1.2. The linked
npm page is the source of truth for the current version.
npm prerelease (recommended during DSH preview)
Use @next to try the newest release candidate that has passed the repository's
CI publishing and official DSH compatibility checks. The current candidate also
contains the bundled cross-platform App Server runtime, so DSH does not depend
on a global codex executable:
npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-codex@next
At the time of writing, next resolves to 0.1.2-rc.1.
GitHub development build
Install the current main branch when testing an unreleased change:
npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-codex#main
main can change at any time. For a reproducible GitHub install, pin a Tag or
full Commit SHA instead. For example:
npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-codex#v0.1.2
The official DSH CLI initializes the web Profile if it does not exist, asks
pnpm to install the selected package, and adds the plugin's bundle layer. No
Relay checkout is required. If you already installed the dsh command, replace
the npx @deepseek-ai/dsh@0.1.1-rc.2 prefix with dsh in any command above.
3. Start or restart DSH Web
npx @deepseek-ai/dsh@0.1.1-rc.2 web
If you use an installed command, run dsh web instead. Bundle membership is read
at startup, so restarting after installation, update, or removal is required.
4. Start a Codex conversation
- Open the DSH URL printed in the terminal. The default is
http://127.0.0.1:3080. - On first launch, read the DSH testing notice and select Continue.
- Select Add workspace in the left sidebar and choose the project directory Codex may work in.
- Select New Session.
- Open the mode menu labeled Standard mode and choose Codex.
- Enter a message and send it. Choose the backend before the first message; existing sessions keep the backend with which they were created.
There is no separate activation command. A successful install plus a DSH restart activates the bundle and registers the managed Codex mode automatically.
5. Import existing Codex sessions for a Workspace
- Open the target Workspace or one of its Sessions in DSH.
- Select Import Codex Sessions below the Workspace list and above Settings.
- Review the aggregate scan counts, then select Import all.
- Confirm that imported rows already show their Codex titles and source activity order, then open any Session and continue chatting.
This release imports the whole Workspace and does not offer per-Thread selection.
Titles and recency are available before a Session is opened; batch execution time
does not replace the Codex inventory thread/list.updatedAt order.
Codex App Server remains authoritative for model context, tool state, and
compaction. DSH stores native user/assistant presentation history and the durable
one-to-one binding; it does not copy private Codex runtime records. Each time an
imported Session is opened, the plugin reads that Codex Thread once and appends
any missing terminal user/assistant Turns to DSH's presentation history, including
interrupted or failed Turns with visible messages. Only an inProgress Turn waits for
the next open. It does
not poll in the background, synchronize while the Session stays open, or add a
manual refresh action.
What Works
- One persistent Codex App Server Thread per DSH Session
- Model and reasoning-effort selection
- Streaming answers and reasoning in the native DSH conversation
- DSH approval and user-question flows
- Images, interruption, and continuation
- Generic DSH tools exposed under the Codex App Server
dshnamespace - Optional terminal transport when the separate Relay terminal plugin is present
Tools execute through the owning Agent's DSH tool runtime and remain subject to DSH permissions and Codex approval behavior.
Reliability and App Server Lifecycle
The DSH Host plugin owns the Codex App Server process. It starts one child while
the plugin activates, before Codex model discovery, and stops it when DSH or the
plugin shuts down. The default child comes from the pinned @openai/codex
dependency, so a global codex command is not required.
Open Settings → Advanced to see whether Codex is Connected, Not
started, Starting, Connection failed, or Codex unavailable. A
forked Session that inherited Codex history without a safe one-to-one binding
shows Rebind required in its Session header. Installation and connection
errors include a stable error code and a next action; raw errors such as spawn codex ENOENT are not shown as the user instruction.
On a blank New Session, switching among Standard, Codex, and Claude selects the matching backend's model group and default reasoning effort. Delayed Codex model discovery is retried, and an older asynchronous result cannot overwrite a newer backend choice.
Forks use the Codex App Server thread/fork method. The child DSH Session sends
the inherited parent Thread id and completed lastTurnId; the returned child
Thread gets a new durable one-to-one binding. The operation fails closed if
provenance is incomplete, the source Thread has no owning DSH Session, or App
Server rejects the fork: Relay never falls back to thread/start. Existing
persisted bindings are also retained when resume fails. A pending approval is
answered only if its DSH Session, Codex Thread, Turn, Item, request, and binding
generation still match after reconnect; otherwise it is rejected with
diagnostic provenance.
See the reliability specification and executable acceptance matrix.
Plugin Boundary and Relay
This repository was designed and compatibility-tested in Relay, an open-source project for long-running agent work, external-event delivery, reusable DSH workbench views, and multiple conversation backends.
The plugin is independently installable. It has no runtime dependency on the Relay application, Relay Events, or another Relay plugin. It does not replace the official DSH layout or install Files and Terminal views. This separation lets a user install only Codex while the broader Relay project can compose Codex, Claude, events, waits, monitors, and workbench extensions when those capabilities are needed.
Explore or star Relay to follow that broader work: https://github.com/yangbobo2021/Relay.
Update, Inspect, or Remove
Stop DSH Web before changing the bundle, then restart it afterward.
# Show why the plugin is installed
dsh plugin --profile web why relay-dsh-plugin-codex
# Update the npm dependency
dsh plugin --profile web update relay-dsh-plugin-codex
# Remove it
dsh plugin --profile web remove relay-dsh-plugin-codex
Use the npx @deepseek-ai/dsh@0.1.1-rc.2 prefix instead of dsh when you do not
have a persistent DSH command.
Troubleshooting
Codex is missing from the mode menu
Restart DSH Web. Then run dsh plugin --profile web why relay-dsh-plugin-codex. If pnpm cannot find the package, repeat the npm
installation command and read its final error.
The first message reports an authentication or executable error
Run codex login with an official Codex client under the same operating-system
user that starts DSH, then restart DSH. The plugin normally uses its bundled
official @openai/codex runtime and does not depend on PATH.
If the error says the bundled runtime is missing, update or reinstall the plugin so the package manager restores the platform-specific optional dependency. A managed deployment can explicitly select another native Codex executable:
# macOS or Linux
RELAY_CODEX_COMMAND=/absolute/path/to/codex dsh web
# Windows PowerShell
$env:RELAY_CODEX_COMMAND = 'C:\absolute\path\to\codex.exe'
dsh web
The DSH bundle configuration property codexCommand has higher priority than
RELAY_CODEX_COMMAND. Prefer an absolute native executable path; leaving both
unset selects the bundled, plugin-tested Codex version.
If Settings shows CODEX_EXECUTABLE_NOT_FOUND, remove an invalid
codexCommand/RELAY_CODEX_COMMAND override or replace it with an absolute
path. CODEX_RUNTIME_MISSING means the platform optional dependency must be
restored by reinstalling the plugin. Connection failed instead means the
executable was found but App Server initialization or its process failed.
A forked Session says Rebind required
Normal forks call App Server thread/fork and bind the returned child Thread.
This status means the source Thread/Turn could not authorize or complete that
operation—for example, the Turn was still running, provenance was incomplete,
or the source binding no longer existed. Return to the original DSH Session,
fix the reported condition, and retry Fork. The plugin intentionally does not
fall back to a fresh replacement Thread.
The composer is disabled
DSH requires a workspace before starting a coding conversation. Select Add workspace, choose a directory, and return to New Session.
An imported Session says the Codex thread is open in another client
Codex permits only one App Server writer for a Thread. Switching to another Thread
in Codex Desktop may leave the writer held by that App Server process. Fully quit or
restart the owning Codex app, CLI, or App Server process, then retry the message in
DSH. The plugin keeps the original one-to-one binding and never creates a replacement
Thread. There is no safe force-takeover operation in the App Server protocol. Opening
the Session can still synchronize terminal presentation history through
thread/read; only continuation is blocked by writer ownership.
Installation says pnpm is missing
Install pnpm using its official installation guide
and confirm pnpm --version works in the same terminal.
DSH changed and the plugin no longer starts
DSH is a developer preview. Include the output of dsh --version, the plugin
source revision, and the startup error in a
GitHub issue.
Development
git clone https://github.com/yangbobo2021/relay-dsh-plugin-codex.git
cd relay-dsh-plugin-codex
npm install
DSH_ROOT=/path/to/deepseek-harness npm run verify
npm pack
npm run verify runs type checking, tests, and the production build. Boundary
tests reject accidental runtime dependencies on Relay or another feature plugin.
Feedback
Report bugs and feature requests in this repository's issue tracker.
