a stored bare harness is not a model choice

CHAT_DEFAULT_MODEL appeared to do nothing, and the picker still read
"claude-code" after a refresh. both because an account can have the BARE
harness stored as its preference, and this one does: chat.defaultProjectModel
and tasks.defaultModel are each 'claude-code'. the client selected it, sent it,
and the server honoured a choice that means "whatever the CLI picks" — opus.
the default only ever applied when nothing was stored, which was nobody.

`claude-code` with no tier is a routing answer and a legitimate one — it is
what decideResume assumes. as an answer to "which model", it is the absence of
one. so it is now READ as unset, in all three places that ask: the chat's
model resolution, the task resolver, and the client's initial selection.

nobody's settings are rewritten. the row keeps what it says and "no tier
chosen" now means what it always meant.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
2026-08-25 18:09:01 +00:00
co-authored by Claude Opus 5
parent 355fcaf1e5
commit 0ef1bbc3c4
3 changed files with 26 additions and 4 deletions
@@ -173,8 +173,11 @@ export function useChat(initialSessionId?: string, initialModel?: string | null,
useEffect(() => {
if (existingSessionId || initialModel) return;
const defaultModel = (projectScoped && settings?.chat?.defaultProjectModel) || settings?.chat?.defaultModel;
if (defaultModel) setSelectedModel(defaultModel);
const stored = (projectScoped && settings?.chat?.defaultProjectModel) || settings?.chat?.defaultModel;
// A stored value with no `/` is the bare harness — a routing answer, not a tier. Selecting it would
// send it, and the server would then honour a "choice" that means "whatever the CLI picks", i.e. Opus.
// Leaving it unselected lets the server apply CHAT_DEFAULT_MODEL, which is the point of that constant.
if (stored && stored.includes('/')) setSelectedModel(stored);
}, [existingSessionId, initialModel, settings, projectScoped]);
// Sync selectedModel when initialModel changes (e.g. resuming a session)