Problem
The VS Code webview never saves AI-setting changes to the workspace. Sends pass skipAiSettingsPersistence: true (#4765), and a model change stays local. After #4778 the webview loads each workspace's real settings, but a user's explicit model, thinking or agent choice made in the webview still does not carry over to the desktop app or to later sessions.
Turning persistence on safely needs the desktop's send-path handling. Codex review of #4778 listed what is missing:
- Selection intent for sub-agent workspaces:
getAiSelectionIntentForSendOptions, with the tokens consumed after a successful send, so deliberate picks update taskAiPins.
- Gateway routes: persist a gateway-preserving model (
normalizeSelectedModel), not the canonical direct-provider ID.
- Unclamped thinking: persist the selected thinking level as is; the backend applies the configured floor.
- Write order: serialize or supersede
updateAgentAISettings writes so rapid picks persist in selection order.
Proposed fix
Reuse the desktop's send-options and selection-intent helpers in the webview composer, rather than copying their logic, and enable persistence only for workspaces with loaded settings.
Refs #4738
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $26.99
Problem
The VS Code webview never saves AI-setting changes to the workspace. Sends pass
skipAiSettingsPersistence: true(#4765), and a model change stays local. After #4778 the webview loads each workspace's real settings, but a user's explicit model, thinking or agent choice made in the webview still does not carry over to the desktop app or to later sessions.Turning persistence on safely needs the desktop's send-path handling. Codex review of #4778 listed what is missing:
getAiSelectionIntentForSendOptions, with the tokens consumed after a successful send, so deliberate picks updatetaskAiPins.normalizeSelectedModel), not the canonical direct-provider ID.updateAgentAISettingswrites so rapid picks persist in selection order.Proposed fix
Reuse the desktop's send-options and selection-intent helpers in the webview composer, rather than copying their logic, and enable persistence only for workspaces with loaded settings.
Refs #4738
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$26.99