dsh-native-codex-cli — Driving Codex CLI Directly via DSH's Chat Interface

Introduction

DeepSeek Harness (DSH) is responsible for the chat interface, while Codex CLI is responsible for task execution and native history. Traditional bridging solutions often require introducing a second AI to relay or simulate context, which increases latency and leads to incomplete history. This plugin implements a direct connection between DSH and Codex CLI: DSH serves only as the client presentation layer, while Codex CLI serves as the host layer. Messages enter Codex’s native turn directly, and every character rendered by the interface is generated from protocol frames pushed by Codex itself.

Core Features

  1. Open an old conversation: Supports querying the thread list, reading history, and restoring a session.
  2. Start a new task: Creates a native Codex thread with the ability to specify the working directory, model, and permission policy.
  3. Send messages: Messages go directly into Codex’s turn/start without intermediate forwarding.
  4. Streaming output: Receives and renders Codex’s protocol frames in real time.
  5. Tool display: Displays notifications such as command execution, file changes, and tool calls.
  6. Stop a task: Truly interrupts execution through turn/interrupt.
  7. Approvals and questions: The UI receives server-side requests, and the user’s selection is sent back.
  8. Refresh and restart: Supports reconnection and association persistence.

Installation and Enablement

Prerequisites:
* DeepSeek Harness (with Web GUI: desktop client or dsh web).
* Codex CLI (logged in).
* Node.js 18+.

Installation steps:
1. Run the installation command:

dsh plugin --profile desktop add git+https://github.com/447662/dsh-native-codex-cli.git
  1. DSH must be restarted. The profile’s bundle list is not hot-reloaded, and the plugin will only become active after an installation restart.

Typical Usage

The plugin provides multiple interaction entry points:

  • Conversation binding: In a DSH conversation, enter @Codex <task>, or click the Codex button on the right side of the input box.
  • Input takeover: After binding, the input box for that session is taken over by Codex. Subsequent messages no longer need @Codex and are all sent directly to Codex.
  • Standalone workbench: Click the Codex icon in the sidebar to open a standalone interface with thread list, new task creation, conversation stream, and input management.

Configuration and Troubleshooting

Configuration file: ~/.dsh/storages/dsh-native-codex-cli/config.json
The plugin does not export a Config schema to avoid Cordis validation errors. If the configuration file is missing or corrupted, it will automatically use the default values in code.

Troubleshooting tips:
* Plugin logs are located at ~/.dsh/logs/dsh-native-codex-cli.log.
* Codex CLI does not strictly depend on PATH; it automatically looks for it in common paths (such as %LOCALAPPDATA%\Programs\OpenAI\Codex\bin).
* If it does not take effect after installation, check the log for markers such as [boot] module imported and [host] ... loaded.

Applicable Scenarios

Suitable for developers who need to drive Codex CLI directly through the familiar chat interface inside DSH. The plugin runs with the permissions of the current DSH process. Before use, it is recommended to review the source code and license (MIT).

Summary

This plugin uses a direct connection protocol to turn DSH’s chat interface into an operation panel for Codex CLI, achieving an architecture of “the interface is managed by DSH, and execution is handled by Codex,” while avoiding the overhead of a second AI.

Resources:
* GitHub: https://github.com/447662/dsh-native-codex-cli
* Ecosystem directory: https://www.skillhub.cn/plugins/447662/dsh-native-codex-cli

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

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

Xiaoye