DeepSeek Harness (DSH) adopts a plugin-based architecture. This plugin connects a ChatGPT Plus or Pro subscription to DeepSeek Harness as an LLM provider, enabling the use of ChatGPT Codex models in local environments through the web interface or command line.
Core Features¶
This plugin provides the following capabilities:
- Device code login: Adds a device-code OAuth login flow through the Web settings interface.
- Slash command: Adds an interactive
/codexslash command to Harness. - No local service: Does not run a browser callback server or localhost listener.
- Model integration: Displays Codex models alongside other providers.
- Automatic refresh: Tokens are automatically refreshed before expiration.
- Usage display: Shows 5-hour and weekly usage limits in the Codex usage dialog.
Installation¶
DSH manages plugins by profile. The plugin must be installed in each profile where the plugin or the /codex command is enabled. The following example uses the web profile:
dsh plugin --profile web add -w @syncended/dsh-codex
After installing or upgrading, restart the corresponding profile.
To remove the plugin:
dsh plugin --profile web remove @syncended/dsh-codex
Usage¶
Web Interface Login¶
- Open Settings → OpenAI Codex.
- Click Sign in. The plugin opens OpenAI’s device login page in another tab.
- Return to DSH, copy the displayed one-time code, and paste it into the OpenAI page.
- Authorize access and return to DSH. The settings page automatically updates to Connected.
- Select an
openai-codex/...model from the standard model selector and send a test prompt. - Use Codex limits above Settings to check the normalized 5-hour and weekly balance.
CLI Interactive Commands¶
/codex is a Harness slash command, not a shell executable. Run it in a profile where the plugin is installed and interactive mode is enabled:
| Command | Description |
|---|---|
/codex login |
Starts the device-code flow and prints the verification URL and code. |
/codex status |
Shows token status and expiration. |
/codex logout |
Deletes the stored token file and revokes active credentials. |
Configuration and Storage¶
By default, the plugin stores tokens in the $DSH_HOME/openai-codex.json file. It publishes only the active access token to the DSH credential service, using the environment variable name OPENAI_CODEX_TOKEN.
The plugin registers the openai-codex route and automatically maps credentials, so the dsh settings set command is usually not required. To modify the default configuration, you can edit the cordis.patch.yml file under the corresponding profile directory:
- id: openai-codex
config:
# clientId: app_EMoamEEZ…hrann
credentialRef: OPENAI_CODEX_TOKEN
deviceCodeTimeoutSeconds: 900
refreshWindowMs: 300000
# dshHome: /absolute/path/to/dsh-home
# tokenFile: /absolute/private/path/openai-codex.json
Environment Requirements and Notes¶
- Subscription requirement: Requires a ChatGPT Plus or Pro subscription with Codex access.
- DSH version: DeepSeek Harness
0.1.0-rc.6or a compatible version. - Runtime: Node.js 18 or later; pnpm must be available for the
dsh plugincommand. - Network access: Outbound HTTPS access to
auth.openai.comandchatgpt.comis required. - Web login limitation: Web login is limited to loopback/same-origin host sessions. For remote hosts, use an authenticated SSH/local tunnel connection to the loopback Web UI instead of publicly exposing credential operations.
- Usage limits endpoint: The usage view uses an undocumented OpenAI Codex usage endpoint, whose availability and response format may change without notice.
- Security note: The
$DSH_HOMEdirectory contains sensitive local credential state. Ensure the directory permissions are secure./codex logoutdeletes the file and clears published credentials.
Summary¶
This plugin integrates ChatGPT Codex models seamlessly into the DeepSeek Harness ecosystem through device-code OAuth and slash commands, supporting automatic token refresh and usage monitoring. It is suitable for developers who need to call Codex models in a local DSH environment.
For more details and source code, visit: GitHub repository