Introduction¶
The plugin ecosystem of DSH (DeepSeek Harness) allows for supplementing Provider integrations, account management, and local routing capabilities. dsh-codex-shared-pool is a community DeepSeek Harness (DSH) extension package designed to manage multiple Codex accounts within DSH: pooling multiple Codex accounts into a single local account pool, and selecting an available account based on the upstream quota of the selected model before each request.
This reduces the workload of manually switching accounts and avoids copying the currently used auth.json to different environments.
What is this¶
dsh-codex-shared-pool is a community DSH bundle designed for Codex account pool integration. The GitHub repository is https://github.com/502399493zjw-lgtm/dsh-codex-shared-pool, with an MIT license.
It is installed by exposing Cordis/DSH extension points and does not modify or fork the DSH core.
Core Capabilities¶
Multi-account Addition¶
Add multiple Codex accounts in DSH settings without copying the currently used auth.json.
Clicking “Add Account” initiates a separate OAuth authorization flow.
Pre-request Account Selection¶
Before each request, the plugin reads the upstream quota of the selected model.
- If the current account is clearly exhausted, automatically select an account with remaining quota.
- When multiple candidate accounts are available, prioritize the account with the earlier upstream reset time.
- After automatic switching, the new account becomes the globally “active” account, but manual switching is also possible.
Account selection occurs before the request is sent to the Provider, not by failing the exhausted account once and then retrying.
Recent Request Log¶
The settings page allows viewing which account handled the recent request, why a switch occurred, the model used, and the success/failure status.
This log is in-process observation data, not a persistent ledger. It retains a maximum of 100 entries within the Host process and is cleared after a Host restart. It does not record prompts, responses, files, OAuth tokens, or session bodies.
Codex Client Capabilities¶
The model menu retains the Chinese mode names and descriptions of the Codex client, including “Standard/Quick” and five levels of reasoning.
The plugin preserves original capabilities such as Codex Responses, search, image generation, read_image, and TUI management.
Team Sharing and Self-hosting Notes¶
The README describes Phase 2 Team Sharing and Self-hosting, including invite-based Teams, member quota sharing, Team request routing, and self-hosted deployment.
Relevant self-hosting templates use deploy/self-hosted/init-secrets.mjs and deploy/self-hosted/compose.yml. Verified materials cannot confirm if these Phase 2 capabilities are fully included in the current npm package version.
Installation and Enablement¶
Below is how to install a fixed version plugin in the DSH Web profile:
dsh plugin --profile web add dsh-codex-shared-pool@0.1.0
After installation is complete, start the same Web profile and go to:
Settings → OpenAI Codex
On the settings page, click “Add Account” to initiate a separate OAuth authorization flow.
TUI Management¶
Local TUI account pool management commands include:
/codex status
/codex login
/codex add
/codex activate <profile-id>
/codex remove <profile-id>
/codex usage
These commands are used to view status, login, add accounts, activate a specific profile, remove accounts, and view usage in the local TUI.
Self-hosting Command Examples¶
The README’s self-hosted deployment instructions provide the following commands:
node deploy/self-hosted/init-secrets.mjs
docker compose -f deploy/self-hosted/compose.yml up --build -d
The first is used to initialize the secrets of the self-hosted template, and the second is used to build and start the self-hosted service.
Development and Verification¶
Development and packaging verification can use the following commands:
pnpm test
pnpm run build
pnpm run verify:package
pnpm pack
Where verify:package only validates the npm package structure and is not equal to real DSH installation verification.
The current fixed verification baseline is:
- DSH
0.1.0-rc.8 - Cordis
4.0.1 - Node.js
^22.19.0or>=24.0.0
Before changing the DSH or Cordis version, you need to re-run the stock installation verification.
Security Boundaries¶
- OAuth credentials, refresh tokens, authentication files, Codex subprocesses, and file system access belong only to the Host.
- The Browser reads only the minimum desensitized data with type constraints via the plugin’s own same-origin routing.
- No credential export interface is provided, nor is it required to upload or copy the currently used
auth.json. - The recent request log does not record prompts, responses, files, OAuth tokens, or session bodies.
- This project is installed by exposing Cordis/DSH extension points and does not modify or fork the DSH core.
Use Cases and Notes¶
This plugin is suitable for developers who use multiple Codex accounts in DSH, wish to reduce manual switching, and want to preserve Codex’s original capabilities.
Since OAuth credentials, refresh tokens, authentication files, Codex subprocesses, and file system access all depend on Host-side permissions, you should check the source code, confirm the MIT license, and understand that it will run with the current dsh process permissions.
Please note:
- Upstream quota depends on the Provider’s currently observable signals; the plugin does not fabricate exact tokens or subscription costs.
- Quota reading fails open temporarily; account switching only occurs before a request if the model quota is explicitly read as exhausted.
- The local recent request log is in-process observation data, not a persistent ledger.
verify:packageonly validates the npm package structure and is not equal to real DSH installation verification.
Links¶
Directory page: https://www.skillhub.cn/plugins/502399493zjw-lgtm/dsh-codex-shared-pool
GitHub: https://github.com/502399493zjw-lgtm/dsh-codex-shared-pool