Skip to content

fix(cli): inherit reasoning in task subagents - #11160

Merged
marius-kilocode merged 1 commit into
mainfrom
clover-hippopotamus
Jun 12, 2026
Merged

fix(cli): inherit reasoning in task subagents#11160
marius-kilocode merged 1 commit into
mainfrom
clover-hippopotamus

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Task-tool subagents that fall back to the calling model currently preserve its provider and model ID but discard the selected variant. This causes delegated work to silently lose the parent's reasoning effort even though it is using the same model.

Preserve the parent variant only when model resolution reaches the true parent-model fallback. Saved selections, per-agent models, and the global subagent model continue to use their own independently resolved variants, so model-specific reasoning settings are not carried across incompatible overrides.

@marius-kilocode
marius-kilocode enabled auto-merge (squash) June 12, 2026 10:32
@kilo-code-bot

kilo-code-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The fix is well-scoped and correct. The variant is threaded through only to the parent-model fallback path, so saved selections, per-agent pinned models, and configured subagent models all continue resolving their own variants independently. Test coverage is thorough — all pre-existing toBeUndefined() expectations remain valid because those tests either resolve a non-fallback path (saved/config model found, so input.variant is never returned) or don't pass a parent variant at all.

Files Reviewed (3 files)
  • .changeset/brave-subagents-think.md
  • packages/opencode/src/kilocode/tool/task.ts
  • packages/opencode/src/tool/task.ts
  • packages/opencode/test/kilocode/tool-task-model.test.ts

Reviewed by claude-4.6-sonnet-20260217 · 834,222 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 78d83c0 into main Jun 12, 2026
21 checks passed
@marius-kilocode
marius-kilocode deleted the clover-hippopotamus branch June 12, 2026 10:45
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants