From e02da9075184fee3e5bdd4513c560b9068f78c83 Mon Sep 17 00:00:00 2001 From: mittal Date: Sun, 25 Oct 2026 01:42:59 +0530 Subject: [PATCH 1/2] fix(desktop): name the model that does quick jobs when the fast role is on Claude Code --- changes/510.fixed.md | 3 +++ .../src/features/models/ClaudeCodeSection.tsx | 25 +++++++++++++------ desktop/src/lib/claudeCode.ts | 21 ++++++++++++++++ desktop/tests/claudeCode.test.ts | 25 ++++++++++++++++++- docs/API.md | 3 ++- sentient/llm/claude_code.py | 5 +++- 6 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 changes/510.fixed.md diff --git a/changes/510.fixed.md b/changes/510.fixed.md new file mode 100644 index 000000000..415083e78 --- /dev/null +++ b/changes/510.fixed.md @@ -0,0 +1,3 @@ +**Settings tells you which model does your quick background jobs when Claude Code is set for them.** It used to warn +that new memories and summaries wouldn't work, even though Sentient hands those jobs to another model you have set up. +Now it names that model. The warning stays as it was when there is no other model. diff --git a/desktop/src/features/models/ClaudeCodeSection.tsx b/desktop/src/features/models/ClaudeCodeSection.tsx index f0ded75f9..28061be3b 100644 --- a/desktop/src/features/models/ClaudeCodeSection.tsx +++ b/desktop/src/features/models/ClaudeCodeSection.tsx @@ -16,7 +16,7 @@ import { useConfigEditor } from '@/hooks/config' import { useClaudeCodeStatus, useHardware, useLocalModels, useSetRoles } from '@/hooks/models' import { qk } from '@/hooks/queryKeys' import { api, errorMessage } from '@/lib/api' -import { claudeCodeState, isClaudeCode, otherModel, refusingRoles } from '@/lib/claudeCode' +import { claudeCodeState, fastStandIns, isClaudeCode, otherModel, refusingRoles } from '@/lib/claudeCode' import { modelShortName, recommendFastLocal, recommendLocal, ROLE_META } from '@/lib/models' import type { RoleName } from '@/lib/types' @@ -204,6 +204,9 @@ export function ClaudeCodeRoleWarning() { const refusing = refusingRoles(roles, status.data?.roles) if (!refusing.length) return null const chat = refusing.filter((r) => r.role !== 'embedding') + // the engine does the fast role's quick jobs on another model when it can (#474): say which, not that they fail + const [standIn] = fastStandIns(roles, config.models.fallbacks, status.data?.roles) + const stuck = standIn ? refusing.filter((r) => r.role !== 'fast') : refusing const rec = hardware.data?.recommendation const installed = (local.data?.ollama.models ?? []).map((m) => m.name) const recInstalled = rec && !rec.cloud_first && installed.some((n) => n === rec.name || n === `${rec.name}:latest`) @@ -219,8 +222,8 @@ export function ClaudeCodeRoleWarning() { local.data ? recommendFastLocal(local.data) : null ]) const label = (r: { role: string }) => ROLE_META[r.role as RoleName].label - const own = refusing.filter((r) => !r.inherited) - const inherited = refusing.filter((r) => r.inherited) + const own = stuck.filter((r) => !r.inherited) + const inherited = stuck.filter((r) => r.inherited) const parts = [ own.length ? `${listText(own.map(label))} ${own.length === 1 ? 'is' : 'are'} set to it` : '', inherited.length ? `${listText(inherited.map(label))} ${inherited.length === 1 ? 'gets' : 'get'} it from your main model` : '' @@ -233,10 +236,18 @@ export function ClaudeCodeRoleWarning() { return ( } title="Some work can't run on Claude Code"> -

- Claude Code only answers your chats, but {parts.join(', and ')}. Until {refusing.length === 1 ? 'it uses' : 'they use'} another model,{' '} - {consequences(refusing.map((r) => r.role))} won't work. You can pick one under Roles. -

+ {stuck.length > 0 && ( +

+ Claude Code only answers your chats, but {parts.join(', and ')}. Until {stuck.length === 1 ? 'it uses' : 'they use'} another model,{' '} + {consequences(stuck.map((r) => r.role))} won't work. You can pick one under Roles. +

+ )} + {standIn && ( +

+ Claude Code can't do quick background jobs, so {standIn} does them. + {stuck.length === 0 && ' You can pick another model for them under Roles.'} +

+ )} {fix && chat.length > 0 && (