Introduction¶
When developing agents in the DSH desktop environment, the model provider, tool loop, approval, and session UI are typically handled uniformly by DSH. If you want inference to go through the locally logged-in Codex App Server without switching clients or losing DSH’s tool and approval pipeline, a common approach is to add a separate LLM provider plugin. The community once had implementations like dsh-llm-codex-app-server, but on the desktop profile of DSH 0.2.0-rc.2, Host half-plugins that depend on @deepseek-ai/* often cannot resolve these packages, causing load failures.
Below we introduce the client-class plugin dsh-codex-session released by maintainer alfredhuang211: when creating a new session, you can choose between “DSH Default” and “Codex”; Codex sessions still use DSH’s session logs, tool loop, approval, and full desktop UI, with only model requests provided by the local Codex App Server.
What Is This¶
dsh-codex-session is a plugin for DSH desktop (desktop profile). When Codex-side requests call tools, the plugin converts them to DSH’s tool-call, which DSH executes, approves, and logs, then returns the result to the same Codex turn. The interface does not open new windows, does not modify DSH packages, and does not shadow built-in slots.
- Maintainer: alfredhuang211
- Category: Client
- Repository: https://github.com/alfredhuang211/dsh-codex-session
- Community directory page: https://www.skillhub.cn/plugins/alfredhuang211/dsh-codex-session
- License: MIT (see repository
package.json) - Current released version: 0.1.0
The plugin only uses Node built-in modules and does not require additional npm dependencies during installation; it accesses DSH through services injected by Cordis and does not import DSH packages.
Core Features¶
Session Type and Agent Presets¶
After installation and restarting the DSH desktop App, a “Session Type” selector appears above the input box when creating a new session; the Agent presets will have an additional Codex option. When Codex is selected, the session’s model routing is pinned to the codex-local provider, and the plugin spawns a local codex app-server to communicate with Codex via newline-delimited JSON-RPC.
DSH Tool Bridging¶
Codex sees the DSH-side tool namespace (such as deepseek_harness). For a set of native Codex capabilities that would bypass DSH and directly manipulate the local machine, the plugin defaults to disabling them via disabledFeatures (including shell_tool, unified_exec, etc.) to prevent command execution from appearing outside session logs and bypassing sandbox and approval constraints. To restore Codex’s original behavior, set disabledFeatures to [] in the configuration (at your own risk).
Model Discovery¶
The model list is not hardcoded in the repository by default; instead, it queries the local Codex for model/list, with results cached for 5 minutes (modelCacheTtlMs defaults to 300000). You can also pin the model or full models list in cordis.patch.yml.
UI Extension (Client Half)¶
conversation.input.dock: Session type selector on blank sessions; started Codex sessions show backend identifier.settings.plugins.tab: Settings page entry for “Codex Sessions”.
Installation and Activation¶
Prerequisites:
- DSH desktop is installed, version ≥ 0.2.0-rc.2 (
engines.dshrequirement). codexCLI is onPATHor~/.codexis logged in; some documentation also requirescodex login statusto pass, and[model_providers.custom](or the section you use) in~/.codex/config.tomlpoints to an available backend.- Node version meets
^22.19.0 || >=24.0.0.
Recommended to lock plugin version for installation:
dsh plugin --profile desktop add git+https://github.com/alfredhuang211/dsh-codex-session.git#v0.1.0
Follow the latest commit on main:
dsh plugin --profile desktop add git+https://github.com/alfredhuang211/dsh-codex-session.git
If published to npm, you can also:
dsh plugin --profile desktop add dsh-codex-session
After installation, restart the DSH desktop App (Host half’s bundle patch is read at startup).
Optional self-check to list models actually provided by local Codex:
cd ~/.dsh/profiles/desktop/node_modules/dsh-codex-session && npm run models-check
Uninstall:
dsh plugin --profile desktop remove dsh-codex-session
Typical Usage¶
- Install and restart the App as described in the previous section.
- Create a new session, select session type (DSH Default or Codex) above the input box, or select Codex in Agent presets.
- Use DSH’s native model selector to switch to discovered models (list comes from local Codex, unless you have hardcoded
modelsin configuration). - Chat normally; tool calls go through DSH approval and logging, model stream returns from local Codex App Server.
When switching an existing session to Codex, it goes through agentPresets.select; if the session is not yet ready, the interface will show the reason returned by the host. The “Session Type” selector only appears on blank sessions.
Configuration Key Points¶
In the codex-session section of cordis.patch.yml, you can adjust behavior. Common items include:
| Key | Default | Description |
|---|---|---|
preset |
codex |
Agent preset id that triggers model pinning |
provider |
codex-local |
Provider routing exposed externally |
model |
Not set | Leave empty to use local Codex default model |
modelProvider |
custom |
Codex internal provider id passed to thread/start, must correspond to ~/.codex/config.toml’s [model_providers.*]; can be changed to openai for official login |
command |
codex |
Codex CLI command |
timeoutMs |
300000 |
Per-turn and streaming JSON-RPC request limit |
disabledFeatures |
See README list | Set to [] to restore Codex native capabilities |
After upgrading Codex or changing proxies, usually restarting the App will make the model list follow changes; you can also shorten modelCacheTtlMs.
Suitable Scenarios and Notes¶
Suitable for: Already logged into Codex locally, want to run Codex models in DSH desktop with the same UI, tool loop, and approval, coexisting with “DSH Default” sessions.
Limitations and notes (from repository description):
- Image input is not supported for now; blocks containing images will be replaced with placeholder text.
- The Codex preset’s sub-plugin list is copied from built-in
standard; may need re-synchronization after major DSH version upgrades. - Codex-side sandbox is
read-only, approval isnever; workspace modifications must go through DSH tools. - Session-level thread cache is in memory; process restart or idle reclamation will cold-start new threads and rebuild history.
Security: The plugin runs with current DSH desktop process privileges, spawns local codex subprocesses, and interacts with local Codex configuration. Read repository source code and MIT license before installation, confirm disabledFeatures and modelProvider match your environment policies. The community directory SkillHub has no official affiliation with DeepSeek / 幻方, and is an independent entry in the community “everything is a plugin” ecosystem.
Conclusion¶
dsh-codex-session makes “choose DSH Default or Codex when creating a new session” a first-class citizen on desktop: models go through local Codex App Server, execution and visibility still belong to DSH. For details, verification commands, and release notes, refer to the GitHub README.
- Directory page: https://www.skillhub.cn/plugins/alfredhuang211/dsh-codex-session
- Source code and documentation: https://github.com/alfredhuang211/dsh-codex-session