fix(cli): preserve default subagent model and reasoning - #13606
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by grok-4.6 · Input: 128.6K · Output: 9.6K · Cached: 310.4K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 31, 2026 11:21
WebReflection
approved these changes
Aug 31, 2026
WebReflection
left a comment
Contributor
There was a problem hiding this comment.
I wonder when/if TS will stop this madness:
{ field?: type | null }and introduce something like:
{ field??: type }which allows both undefined and null as type, following the TC39 Nullish coalescing operator (??) standard https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
This was referenced Aug 31, 2026
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 Problem This Solves
With experimental Task model selection enabled, providers that require every advertised field have no null value for leaving model, provider, and reasoning unchanged. The tool instructions also encourage autonomous model choices based on complexity, cost, and latency, which can replace the intended defaults with an unsuitable or older model.
Why This Change Was Made
Keep the normal delegation path unchanged unless an override is explicitly requested. Accept omitted or null selectors as no override, and tell the agent to use catalog lookup only for requested overrides rather than guessing model names. Existing default precedence, resume behavior, and validation of real overrides remain unchanged. This corrects the optional-selection behavior introduced in #13557.
User Impact
Subagents retain their normal model and reasoning settings without requiring the caller to name either. Explicit model selection and reasoning-only overrides still work. The experiment remains opt-in.
Evidence
Manual check: enable Task model selection, delegate without an override, then request only a reasoning change. Confirm the child keeps its normal model and only the requested reasoning changes.