From d2c70be14ea73b5c0f5a9d4c8b3935ea94db8b36 Mon Sep 17 00:00:00 2001 From: Basit Balogun Date: Sat, 23 May 2026 18:08:48 +0100 Subject: [PATCH] fix: push updated config options to renderer after mid-task model change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When switching models mid-task, `rebuildEffortConfigOption` correctly rebuilds/removes the effort config, but the updated configOptions were never pushed back to the renderer via a session subscription event. The renderer's optimistic update only changed the model currentValue, leaving stale effort options visible — causing errors when selecting incompatible efforts and showing the selector for models that don't support thinking effort at all. Emit a `config_option_update` session event at the end of `setSessionConfigOption` so the renderer always receives the fully rebuilt configOptions. Closes #2323 Co-Authored-By: Claude Opus 4.6 --- packages/agent/src/adapters/claude/claude-agent.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/agent/src/adapters/claude/claude-agent.ts b/packages/agent/src/adapters/claude/claude-agent.ts index cb712669c..850ef6020 100644 --- a/packages/agent/src/adapters/claude/claude-agent.ts +++ b/packages/agent/src/adapters/claude/claude-agent.ts @@ -1023,6 +1023,14 @@ export class ClaudeAcpAgent extends BaseAcpAgent { : o, ); + await this.client.sessionUpdate({ + sessionId: this.sessionId, + update: { + sessionUpdate: "config_option_update", + configOptions: this.session.configOptions, + }, + }); + return { configOptions: this.session.configOptions }; }