Introduction¶
The DeepSeek Harness (DSH) ecosystem emphasizes that “everything is a plugin.” When using Codex for subagent delegation, the official @deepseek-ai/dsh-subagent-codex plugin presents two limitations: First, its Schema only exposes description and prompt, preventing the specification of a specific model or reasoning effort during each call. Second, it exists as a global Host tool that cannot be disabled via presets and may cause conflicts when combined with certain configurations. The dsh-subagent-codex-pro plugin aims to fill this gap; by registering delegation tools within the Agent context, it enables the capability to carry independent model and reasoning effort settings for each call.
Plugin Overview¶
- Name: dsh-subagent-codex-pro
- Positioning: A DeepSeek Harness plugin providing Codex delegation capabilities
- Core Capability: Allows callers to specify
modelandreasoning_effortfor each delegation - Maintainer: ckanner
- License: MIT
Installation and Activation¶
As a DSH plugin, the installation process follows DSH’s plugin management specifications. Install the plugin under the desktop profile:
dsh plugin --profile desktop add dsh-subagent-codex-pro
Upon installation, the plugin automatically registers the required tools.
Features and Usage¶
This plugin supports passing models, reasoning effort, structured output schemas, and image inputs within tool calls.
1. Specifying Model and Reasoning Effort¶
When calling tools.subagent_codex, you can override Codex’s default configuration using the model and reasoning_effort parameters.
tools.subagent_codex({
description: "Probe output PROBE_OK",
prompt: "Output exactly one line of text: PROBE_OK",
model: "gpt-6-astra",
reasoning_effort: "xhigh",
})
2. Structured JSON Output¶
Using the output_schema parameter, you can instruct Codex to return structured data conforming to a specific JSON Schema, facilitating subsequent processing.
tools.subagent_codex({
description: "Smoke verdict",
prompt: "Assess whether both endpoints returned 200.",
output_schema: {
type: "object",
properties: {
verdict: { type: "string", enum: ["pass", "fail"] },
count: { type: "number" }
},
required: ["verdict", "count"],
additionalProperties: false,
},
})
3. Visual Input¶
The plugin supports images as input; the images parameter accepts an array of absolute paths.
tools.subagent_codex({
description: "Match this design",
prompt: "Rebuild this screen's layout in the component below.",
images: ["/tmp/design.png"],
})
Notes¶
When using this plugin, please pay attention to the following behaviors and limitations:
- Conflict Avoidance: The tool name registered by the plugin is
subagent_codex. Since this name conflicts with the official global Host tool, do not enable atool-subagentline with the same name in the same preset; otherwise, it will cause a registration conflict. - Configuration Display: If you need to hide the model and reasoning effort fields, set
modelSelectiontofalse. - Image Path Validity: The paths passed to
imagesmust be absolute paths and the files must exist. The App-server will silently ignore invalid local image paths, which may result in the task failing due to missing visual input without throwing an error. - Default Value Strategy: When
modelandreasoning_effortare not specified in a call, the plugin does not set default values but relies on Codex’s own configuration (~/.codex/config.toml).
Technical Implementation Details¶
The plugin solves the issue of the official adapter being unable to pass parameters through a two-layer mechanism:
- Execution Layer: It implements the protocol logic of the official adapter (thread start, turn start, notification handling) but explicitly passes
modelandreasoning_effortinthread/startandturn/start. It utilizes a custom JSON-RPC transport and launchesapp-server --stdiovia PATH, rather than relying on the official adapter. - Registration Layer: The plugin registers itself into the Agent’s local context (
agent.ctx.tools) during theagent/createdevent. This scoped registration overrides the global Host tool, thereby achieving fine-grained control over specific Agents.
Conclusion¶
dsh-subagent-codex-pro addresses the issue in DSH where Codex delegation lacks fine-grained control over models and reasoning effort. By registering tools within the Agent scope, it bypasses the limitations of official global tools and provides support for structured output and visual input. The code is open source under the MIT license, making it suitable for developers who need to dynamically switch model strategies in complex reasoning tasks.
- Directory Page: dsh-subagent-codex-pro
- GitHub:ckanner/dsh-subagent-codex-pro