Conversation
User-authored ~/.agents/subagents/*.md files that share a builtin definition id now replace that builtin instead of being appended as duplicates. The registry resolves user overrides first, keeps builtin entries otherwise, and session launch re-reads the directory per launch.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened
The five shipped builtin subagents (
explorer,code-reviewer,test-runner,fixer,ui-designer) could only be switched on or off (ADR 0270). A user who wantedtest-runnerpinned to a cheaper model, orfixerwith a stricter write policy, had no supported path: copying the builtin into~/.agents/subagentscreates a second Settings row that claims the same handle, and the two enablement switches then disagree.What this adds
An app-owned override directory,
<data>/subagent-overrides/*.md, whose Markdown documents retune a shipped builtin by name (ADR 0319):builtinsource, so the ADR 0270 Settings switch still governs the retuned definition and Settings renders one row;subagent/catalogrequest, so an edit reaches every session — open ones included — on its next prompt;builtinOverridesDir(dataDir); the loader stays directory-agnostic and testable.Example: a
<data>/subagent-overrides/test-runner.mdwith a differentmodel:pin changes which model the shippedtest-runnerdelegate uses, with no second row anywhere.Docs
03-runtime/02-agent-runtime.md§5f catalog paragraph (en + zh)04-ux/06-settings-ia.mdBuilt-in group note (en + zh)06-delivery/04-e2e-test-plan.mdE2E-1175 journeyVerification (Windows 11, Node 24, Pi 1.0.1 baseline = current main)
subagent-definitions+subagent: 65/65 pass (25 new override cases: merge order, unknown-name diagnostic, user-document precedence, disabled-builtin interplay, re-read per launch)subagent-builtin-overrides.test.mjs: pass (session-launch wiring reads<data>/subagent-overrides)App version: main @ c79b6ca
OS: Windows 11 26220.9587