Skip to content

fix(vscode): honor configured reasoning defaults - #13546

Merged
marius-kilocode merged 2 commits into
mainfrom
validate-and-improve-pr-13539-fix
Aug 28, 2026
Merged

fix(vscode): honor configured reasoning defaults#13546
marius-kilocode merged 2 commits into
mainfrom
validate-and-improve-pr-13539-fix

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Agent Behaviour can save a reasoning override that new Agent Manager sessions do not use. With Code configured to use Max and an older saved High preference, the picker and the provider request still use High.

Fixes #13514. Supersedes #13539.

Why This Change Was Made

The changes in #13539 restore the configured variant only when no remembered picker value exists. An isolated VS Code self-test reproduced the reported High reset with that patch applied and a legacy High preference in the test profile.

The same test also exposed an existing request mismatch: selecting Default changes the picker, but an omitted variant lets the backend apply the agent's configured Max again. Fixing only the displayed fallback does not make that selection work end to end.

New chat inputs already have a draft ID, so their explicit choices remain above the configured default.

Use this precedence: explicit session or draft choice, valid configured reasoning for the matching agent model, remembered agent preference, then legacy preference. Keep Default as an explicit empty-string request value, and recover it from session history. The worktree dialog now stores explicit choices rather than freezing an inherited configuration value.

User Impact

  • New local sessions and worktree tabs use the configured reasoning override even when older picker preferences remain.
  • Existing session choices remain independent, including Default after a reload.
  • Configured fallbacks apply only to the matching model and supported variant. Explicit model switches still preserve the displayed reasoning effort.
  • Configure New Worktree follows later settings changes when its selection is inherited. Explicit Default remains selected when the dialog is reopened and is used for the first request.

Evidence

Tested the built extension and local CLI through vscode-self-test, using isolated settings, sessions, and a disposable Git repository. A local OpenAI-compatible provider exposed Low, High, and Max and recorded the actual reasoning_effort field. No live model account or real credentials were used.

Scenario #13539 applied Replacement
Configured Max with legacy High preference New tab shows High; request sends high New tab shows Max; request sends max
Explicit Default with configured Max Picker shows Default; request still sends max Picker shows Default; request omits reasoning_effort

Also exercised Default before the first message, existing High session restoration, Default after a window reload, independent new tabs, agent switching, model switching with effort preservation, quick worktree creation, configured worktree creation, dialog reopening, and a saved settings change from Max to Low.

Configured override:

Agent Behaviour has the Code agent variant set to Max

New tab with the same legacy High preference, #13539 on the left and the replacement on the right:

With PR 13539 applied, the new Agent Manager tab still shows High

The replacement uses configured Max in the new Agent Manager tab

The local provider reports the incoming request effort. Request 1 generates the session title. The message requests use Max (request 2) and then model default (request 3), matching the picker:

Local provider confirms Max followed by model default, matching the reasoning picker

@kilo-code-bot

kilo-code-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (11 files)
  • .changeset/fix-agent-reasoning-defaults.md
  • packages/kilo-vscode/tests/unit/agent-manager-initial-message.test.ts
  • packages/kilo-vscode/tests/unit/session-preferences.test.ts
  • packages/kilo-vscode/tests/unit/session-variant-store.test.ts
  • packages/kilo-vscode/tests/unit/session-variants.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/NewWorktreeDialog.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/initial-message.ts
  • packages/kilo-vscode/webview-ui/src/context/session-preferences.ts
  • packages/kilo-vscode/webview-ui/src/context/session-variant-store.ts
  • packages/kilo-vscode/webview-ui/src/context/session-variants.ts
  • packages/kilo-vscode/webview-ui/src/context/session.tsx

Reviewed by grok-4.6 · Input: 438.4K · Output: 27.3K · Cached: 2.5M

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit c4309e0 into main Aug 28, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the validate-and-improve-pr-13539-fix branch August 28, 2026 13:20
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.

[Bug] Code agent restores High reasoning instead of configured Max for GPT-5.6 Luna

2 participants