Repository navigation
Profile patch layer cannot override nested preset entries (e.g. enabling optional subagent-codex provider) #8547
Replies: 1 comment
|
There is a persistent profile-level workaround for this layout: override the enclosing Your report does identify a useful limitation, but the precise boundary is the preset's I reviewed the source at 1. Why the direct tool ID is not foundIn if (entry.group && Array.isArray(entry.config)) {
buildMap(entry.config)
}Consequently, a child inside an ordinary loader group can be patched by its ID. However, the shipped Standard preset is a loader declaration whose configuration is an object containing the preset definition: The index reaches This also explains why adding a slash-separated or dotted target does not currently solve it: this helper looks up an ID string in its map; it does not interpret a nested path. Such syntax would need an implementation change. 2. Use a complete preset override in the profileFor the checkout and profile paths in your report, the source to copy is: The destination is the existing profile patch: First make a backup of that profile patch. Then:
The beginning of the resulting override should be: - id: preset-standard
name: '@deepseek-ai/dsh-agent-preset'
config:
id: standard
order: 1
plugins:That excerpt is only the header, not a complete patch to paste on its own. Immediately below it must be the entire plugin list copied from the source, at the correct indentation. Inside that complete list, the Codex row should retain this shape: - id: tool-subagent-codex
name: '@deepseek-ai/dsh-tool-subagent'
disabled: false
config:
provider: codex
toolName: subagent_codex
backgroundMode: one-shot
maxDepth: provider-managedAgain, this second excerpt belongs at its existing location inside the copied delegation group; it is not a separate top-level profile override. The reason for copying the complete configuration is important: the helper applies overrides with The shipped preset's own header explicitly describes profile overrides of this declaration. The project's implementation note on disabled preset tools also describes overriding a shipped preset's plugin composition from the profile patch. The same enclosing-declaration approach applies here. 3. Keep provider registration and tool enablement separateYour provider dependency/bundle setup and this preset change do different jobs:
Keep the provider bundle you installed; overriding the preset does not install that provider. For a separate custom preset, give its preset identity a new value rather than inserting another definition with 4. Verify composition first, then executionRun your existing diagnostic: dsh --profile web --dump-configIn the resulting configuration, check the actual
Then start the Web profile through your usual launch command and create a new session using Standard. A new session avoids relying on an already-running session's retained preset revision; the checked registry also prevents selecting a different preset after a session has started its first turn. Check whether For validation of the explanation, I ran the extracted upstream 5. What remains worth improving upstreamThis approach persists in the profile instead of modifying a file in the checkout. It does have a maintenance tradeoff: your copied preset composition becomes a snapshot. After upgrading Harness, compare it with the new shipped Standard preset and incorporate relevant changes, rather than assuming a full replacement automatically inherits newly added defaults. A scoped nested override or an explicit optional-tool switch would avoid that snapshot cost. For a nested implementation, scoping matters because different presets can use the same child tool ID. A regression test should distinguish an ordinary loader group from a preset's So the improvement request is useful, but the current workaround can already live entirely in the profile: target the enclosing preset declaration, preserve its full configuration, and change the nested tool's separate disabled flag. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The profile patch layer (
$DSH_HOME/profiles/<name>/cordis.patch.yml) can only targettop-level loader entries. It cannot override entries nested inside an agent preset
(e.g.
preset-standard→config.plugins→delegation→tool-subagent-codex).As a result, enabling an optional subagent provider shipped as
disabled: truein apreset requires editing the preset file inside the repo checkout, which is then
reverted by
pnpm run build/git pull.Environment
C:\Tools\deepseek-harness)webatC:\Users\Administrator\.dsh\profiles\webReproduction
Goal: enable
subagent_codex(providercodex).Install the provider bundle into the profile so the host-level provider registers:
profiles/web/package.json:{ "dependencies": { "@deepseek-ai/dsh-subagent-codex": "link:<repo>/packages/subagent/subagent-codex" }, "dsh": { "profile": { "bundles": [ "@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "@deepseek-ai/dsh-subagent-codex" ] } } }Try to enable the model-facing tool from the profile patch layer instead of editing
the preset:
profiles/web/cordis.patch.yml:Boot:
Observed:
The entry is defined only inside
preset-standard's nesteddelegationgroup, not atthe top level, so the id match fails.
To actually enable it, we must edit the shipped preset:
packages/bundle/web-app/presets/standard.patch.yml:This works, but
pnpm run build/git pullrestoresdisabled: trueand the toolsilently disappears.
Evidence that this is a loader limitation, not a config mistake
vendor/include/src/index.tswarnspatch: entry %C not foundfor unmatched ids.packages/boot/app-boot/tests/user-patches.spec.tsonly exercises top-level idoverrides and
insertentries; there is no test covering an override of an entrynested inside a preset's
config.pluginstree.Proposal
One of:
Allow profile patches to target nested entries by path, e.g.:
or a dotted id syntax.
Expose a stable, overridable switch for optional provider tools (e.g. a
presets.standard.tools.subagent_codex.enabledkey) that a profile patch can flip.Document the intended way to enable optional subagent providers without editing
files under
packages/bundle/..., if such a way already exists.Impact
Every user who wants
subagent_codex(orsubagent_claude_code) has to maintain alocal patch against the repo checkout, and re-apply it after every build. This makes
optional-provider enablement fragile and easy to lose silently.
All reactions