@argszero/cordis-plugin-subagent-effort
v0.1.1
Published
Per-delegation reasoning effort for dsh subagents: makes AgentOptions.reasoningEffort reach child requests (the agent loop silently ignored it) and adds a subagent_effort tool that accepts reasoning_effort and model per call
Maintainers
Readme
@argszero/cordis-plugin-subagent-effort
Per-delegation reasoning effort for deepseek-harness (dsh) subagents.
⚠️ Superseded upstream (0.1.2-alpha.1, 2026-08-28)
deepseek-harness 0.1.2-alpha.1 fixed this gap natively:
AgentOptionsnow carriesreasoningEffort(consumed by the agent-loop request builder), anddsh-tool-subagentexposes a per-callreasoning_effortparameter plus background/continuable delegation. This plugin is not needed on ≥ 0.1.2-alpha.1 and is kept for users pinned to0.1.1-rc.2, where the silent-drop gap still exists. See discussion #4666 for the maintainer-confirmed root cause and the upstream fix.
Closes one gap end to end: @deepseek-ai/dsh-tool-subagent accepts config-level
agentOptions and forwards them into the child's AgentOptions, but the agent
loop's request builder only reads provider / model / maxTokens from
AgentOptions — a reasoningEffort declared there was silently ignored
(the model never saw it, no error). This plugin fixes the consumption side and
adds a per-call effort tool.
What it does
- Effort plumbing — extends the merge-extensible
AgentOptionsinterface withreasoningEffortand injects it into every request of that agent via theagent/requestwaterfall. Config-declared effort (e.g.tool-subagent'sagentOptions.reasoningEffort) now actually reaches the adapter. - Per-call tool — registers
subagent_effort(configurable), a foreground subagent tool acceptingreasoning_effort(off|low|high|max, the DeepSeek adapter vocabulary) and an optionalmodeloverride per call, forwarded as childagentOptions.
Install
# add to your dsh profile (the dsh.bundle declaration mounts it as a profile layer)
pnpm add @argszero/cordis-plugin-subagent-effortSet the provider in your profile's cordis.patch.yml (last write wins per row):
- set:
- id: subagent-effort
config:
provider: spawn # your ctx.subagents provider name
# toolName: subagent_effort
# defaultReasoningEffort: highConfig
| key | type | default | meaning |
|-----|------|---------|---------|
| provider | string | — (required) | the ctx.subagents provider name to delegate on (e.g. spawn, fork, acp) |
| toolName | string | subagent_effort | model-facing tool name |
| defaultReasoningEffort | 'off' \| 'low' \| 'high' \| 'max' | provider default | effort applied when a call omits reasoning_effort |
Usage
Config-level effort (fixes the silent drop)
With @deepseek-ai/dsh-tool-subagent configured with agentOptions, the
effort now reaches the child's requests:
- set:
- id: subagent
config:
provider: spawn
agentOptions:
reasoningEffort: highWithout this plugin that value was accepted and silently ignored.
Per-call effort (new tool)
The subagent_effort tool lets the model vary the thinking budget per
delegation:
{
"description": "verify the proof",
"prompt": "Check the induction step carefully…",
"reasoning_effort": "max"
}Optional model overrides the child's model for that delegation.
Design notes
- The tool mirrors
@deepseek-ai/dsh-tool-subagent's provider lifecycle: it registers when the configured provider appears and unregisters when it leaves. - The
agent/requestlistener is conservative: only agents whose options explicitly carryreasoningEffortare touched; every other request passes through unchanged. - Foreground-only by design — background/continuable delegation is available
from the built-in
subagenttool; this plugin is about effort control.
Peer range
This plugin targets one dsh line, and declares every harness package it reads as a peer rather than a dependency:
>=0.1.1-rc.2 <0.1.2declared identically on @deepseek-ai/dsh-agent, @deepseek-ai/dsh-llm,
@deepseek-ai/dsh-session, @deepseek-ai/dsh-subagent and
@deepseek-ai/dsh-tools. It admits exactly 0.1.1-rc.2.
The narrow scope is deliberate: upstream closed this gap natively in
0.1.2-alpha.1 (AgentOptions.reasoningEffort is consumed from there), so the
plugin is only meaningful on the line where the silent drop still exists.
The declaration was the bug. v0.1.0 shipped these five as dependencies at
^0.1.1-rc.2, and a caret on a prerelease admits only its own tuple — so no
newer tree could satisfy it, and npm resolves an unsatisfiable dependency by
nesting its own copy. Installing the published 0.1.0 into a project running dsh
0.1.6-alpha.2 produced:
node_modules/@argszero/cordis-plugin-subagent-effort/node_modules/@deepseek-ai/dsh-tools (=0.1.1-rc.2)
node_modules/@deepseek-ai/dsh-tools (=0.1.6-alpha.2)Two copies of the harness runtime in one process, with no warning at all. As a
peer the same narrow scope produces the correct outcome instead: npm refuses
the install with ERESOLVE, which tells a user on a newer line that this plugin
is not for them.
test/peer-range.spec.mjs asserts the admitted set exactly, asserts that no
harness package appears in dependencies, and asserts that this README quotes
the manifest range verbatim.
Development
npm install
npm run build # tsc → lib/
npm test # tsc + node --test (peer-range / declaration guard)License
MIT
