DSH Codex Bridge: A Bidirectional Collaboration Plugin for Local Codex and DSH

Introduction

DeepSeek Harness (DSH) is built on an “everything is a plugin” architecture, but developers frequently need to pass context and messages between DSH and a local Codex instance. Traditional approaches often require manually copying gateway tokens, maintaining a second process, or relying on a global Node.js environment—steps that are error-prone and difficult to scale. DSH Codex Bridge is a standard plugin that, once installed in DSH, establishes bidirectional messaging, workspace, and session management capabilities between local Codex and DSH.

Plugin Overview

DSH Codex Bridge is developed by maintainer qiuYliangM, with the current version at 0.5.3. It is a “client”-type plugin that connects the Codex CLI to DSH. Upon activation, it automatically registers a Codex HTTP MCP server and uses the host runtime—requiring no second application, no persistent Hub, and no manual copying of gateway tokens. The standalone project originates from the plugin branch of Codex DeepSeek Bridge.

Core Features

The plugin provides 12 peer_* tools on both ends, where peer refers to the counterpart client. When the target is unambiguous, pass the exact workspace and session directly:

{
  "workspace": "Counterpart workspaceId or exact absolute path",
  "session": "sessionId under that workspace",
  "text": "Please check the current workspace"
}

peer_send and peer_ask require both a workspace and a session to be provided simultaneously. If the target does not exist, has been archived, or the session does not belong to that workspace, an error is returned. You must handle this via query/create tools yourself—no default target is guessed, and nothing is auto-created.

Key tool list:

  • peer_status: View connection and capabilities
  • peer_workspaces / peer_create_workspace / peer_rename_workspace: List, create, or rename workspaces
  • peer_sessions / peer_create_session / peer_rename_session / peer_archive_session: List, create, rename, archive, or restore sessions
  • peer_send: Queue a message; an acknowledgment does not mean the model has finished the task
  • peer_ask / peer_answer: Question-and-answer with timeout, cancellation, and question ID association
  • peer_events: View the shared timeline

The _meta.threadId from the native Codex MCP and the DSH tool execution context automatically provide the source session. Manually filling in sourceSession when it conflicts with the host’s source will trigger an error. The HTTP MCP’s connection session ID is not used for chat identification. The source label is not an authentication mechanism—returning a target still requires explicit parameters.

Installation & Activation

Both clients must be installed on the same machine under the same OS user, and the Codex CLI must be available. Compatible with DSH >=0.2.2-rc.4 <0.3.0-0 and a host running Node.js 22.19+.

Installation command (desktop profile):

dsh plugin --profile desktop add github:qiuYliangM/dsh-codex-bridge#v0.5.3

For the Web version, change desktop to web:

dsh plugin --profile web add github:qiuYliangM/dsh-codex-bridge#v0.5.3

The repository root directory itself is the installable bundle—there are no build scripts at installation time. After first activation, reload the Codex tools; if the host prompts for a restart, restart DSH.

If DSH Desktop 0.31.7 erroneously cleans up local .tgz dependencies at startup, you can first extract to a persistent directory, then install via the plugin page or CLI:

mkdir -p ~/.local/share/dsh-codex-bridge/0.5.3
tar -xzf /path/to/peerbridge-dsh-plugin-0.5.3.tgz --strip-components=1 -C ~/.local/share/dsh-codex-bridge/0.5.3
dsh plugin --profile desktop add ~/.local/share/dsh-codex-bridge/0.5.3

Keep this directory intact; for upgrades, use a new versioned directory.

Configuration

Set the following in the codex-deepseek-bridge plugin configuration within DSH:

Field Default Purpose
autoConfigureCodex true Automatically register its own Codex MCP
mcpServerName peerbridge MCP name and routing path in Codex
codexBin Auto-detected Path to the available Codex executable
codexHome Environment variable or ~/.codex Target Codex configuration directory

When multiple DSH profiles coexist, set a different mcpServerName for each. A given profile can only have one set of peer_* tools; if a same-named external tool is discovered, disable the conflicting plugin—the bridge will refuse to overwrite.

Uninstallation

Deactivate or remove via the DSH plugin page, then restart as prompted by the host. A normal deactivation cleans up tools, routes, and the auto-registered Codex MCP it owns. In manual mode (autoConfigureCodex: false), it only releases its own active flag and does not modify user-managed configuration.

Offline uninstalls or forced exits may leave stale registrations. Inspection and explicit cleanup commands are provided:

node scripts/cleanup.mjs
node scripts/cleanup.mjs --apply --profile-dir /absolute/path/to/dsh/profiles/desktop

Shared history, indexes, old backups, and download directories are retained by default. Chat workspaces and other plugins’ data are not deleted.

Use Cases & Caveats

This plugin requires the host’s tools, webServer, connection, profileContext, and loader services, and supports local loopback HTTP. Headless/SDK profiles without a web service, remote listening, and TLS endpoints are not yet supported.

Before installing, review the source code and license. Neither the source code nor the release package contains credentials for either client or any accounts.

Conclusion

DSH Codex Bridge enables bidirectional collaboration between local Codex and DSH with a single installation. It auto-registers the Codex MCP, provides 12 peer tools, and requires no extra processes or manual configuration—making it ideal for developers who need to pass context between DSH and Codex.

Plugin Center · GitHub

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye