Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(society): route agent effort automatically
Ruben Lütke71354b49d488
diff --git a/jarvis/agent_chat/effort.py b/jarvis/agent_chat/effort.pyindex e2873f7c7e..e1bdd82d09 100644--- a/jarvis/agent_chat/effort.py+++ b/jarvis/agent_chat/effort.py@@ -16,6 +16,7 @@ Single source of truth: the frontend receives these lists throughfrom __future__ import annotations+import refrom typing import Final# The universal ordering — every provider ladder is a sub-sequence of this.@@ -134,3 +135,30 @@ def normalize_effort(provider: str, level: str | None) -> str:if lower:return lower[-1]return offered[0]+++def automatic_society_effort(prompt: str) -> str:+ """Pick a CLI effort for a Society turn when the model requires one.++ Keep the choice per turn, so a short follow-up does not inherit the cost+ of an earlier complex assignment. Provider-native adaptive thinking remains+ in charge when a runner can omit an effort setting.+ """+ task = prompt.partition("\n\n")[2] if prompt.startswith("Scheduled routine ") else prompt+ task = task.strip()+ words = task.split()+ steps = sum(+ line.lstrip().startswith(tuple(f"{n}." for n in range(1, 10))) for line in task.splitlines()+ )+ if len(words) > 110 or steps >= 3:+ return "high"+ complex_task = re.search(+ r"\b(?:fix|debug|investigat\w*|analy[sz]\w*|review|implement\w*|"+ r"refactor\w*|untersuch\w*|analysier\w*|" # i18n-allow: spoken task verbs+ r"prüf\w*|beheb\w*|reparier\w*)\b", # i18n-allow: spoken task verbs+ task,+ re.IGNORECASE,+ )+ if len(words) <= 18 and steps == 0 and not complex_task:+ return "low"+ return "medium"diff --git a/jarvis/agent_chat/runner_cli.py b/jarvis/agent_chat/runner_cli.pyindex 2632774093..2dedbf416a 100644--- a/jarvis/agent_chat/runner_cli.py+++ b/jarvis/agent_chat/runner_cli.py@@ -528,9 +528,10 @@ def plan_grok(return CliPlan(argv, env, None, "claude", sid)-#: agy's own model ids as of 1.1.19, for a box where ``agy models`` cannot be+#: agy's model ids verified on 2026-09-19, for a box where ``agy models`` cannot be#: read (the live list is account-dependent and wins whenever it answers).AGY_FALLBACK_MODELS: Final[tuple[tuple[str, str, tuple[str, ...]], ...]] = (+ ("gemini-3.8-flash", "Gemini 3.8 Flash", ("low", "medium", "high")),("gemini-3.7-flash", "Gemini 3.7 Flash", ("low", "medium", "high")),("gemini-3.6-flash", "Gemini 3.6 Flash", ("low", "medium", "high")),("gemini-3.5-flash", "Gemini 3.5 Flash", ("low", "medium", "high")),@@ -612,10 +613,28 @@ def agy_model_args(return ["--effort", effort] if effort in _AGY_EFFORT_SUFFIXES else []row = by_id.get(model)if row is None:- # A suffixed or unknown id: pass it through untouched.+ # A new Gemini base may arrive before our fallback catalog updates.+ # agy rejects that base without --effort even when discovery failed.+ if model.startswith("gemini-") and not model.endswith(+ tuple("-" + level for level in _AGY_EFFORT_SUFFIXES)+ ):+ return [+ "--model",+ model,+ "--effort",+ effort if effort in _AGY_EFFORT_SUFFIXES else "medium",+ ]+ # A suffixed or other unknown id passes through untouched.return ["--model", model]ladder = list(row.get("efforts") or [])if not ladder:+ if model.startswith("gemini-"):+ return [+ "--model",+ model,+ "--effort",+ effort if effort in _AGY_EFFORT_SUFFIXES else "medium",+ ]return ["--model", model]if ladder == ["medium"] and model.startswith("gpt-oss"):# gpt-oss-120b: the bare id runs; ``-medium`` is the only suffix.@@ -2604,6 +2623,16 @@ async def _run_cli_once(chat_ref = approval_ref(session.session_id)cwd = _resolved_cwd(session.cwd or Path.home())effort = normalize_effort(session.provider, session.effort)+ if getattr(session, "surface", "") == "society":+ from .effort import automatic_society_effort++ # agy requires a value; Codex and Grok accept the same three common+ # levels. Other CLIs retain native adaptive thinking or model defaults.+ effort = (+ automatic_society_effort(user_text)+ if runner in {"agy-cli", "codex-cli", "grok-cli"}+ else ""+ )planner = _PLANNERS[runner]status = "done"error_text: str | None = Nonediff --git a/jarvis/society/chat_binding.py b/jarvis/society/chat_binding.pyindex 7f238b14a7..408c167863 100644--- a/jarvis/society/chat_binding.py+++ b/jarvis/society/chat_binding.py@@ -51,15 +51,15 @@ _CEILING_TO_MODE: Final[dict[str, str]] = {def pair_for(cfg: Any, agent: AgentRecord) -> tuple[str, str, str]:- """``(provider, model, effort)`` the agent's chat runs on."""+ """Return the agent's provider and model with automatic effort."""if agent.provider:- return agent.provider, agent.model, agent.effort+ return agent.provider, agent.model, ""from jarvis.local_models.assistant_session import agents_tiertier = agents_tier(cfg)if not tier.ready:raise PermissionError(tier.reason or "no provider can run the agent chat")- return tier.provider, tier.model, agent.effort+ return tier.provider, tier.model, ""def _workspace(cfg: Any, agent: AgentRecord) -> str:@@ -78,11 +78,10 @@ def _workspace(cfg: Any, agent: AgentRecord) -> str:def ensure_session(svc: Any, cfg: Any, agent: AgentRecord) -> Any:"""The agent's canonical session, created or re-seated to the roster row."""- from jarvis.agent_chat.effort import default_effortfrom jarvis.agent_chat.permissions import ladder_key, normalize_permissionfrom jarvis.agent_chat.service import resolve_runner- provider, model, effort = pair_for(cfg, agent)+ provider, model, _ = pair_for(cfg, agent)session_id = agent.session_idexisting = svc.store.get_session(session_id)if existing is None:@@ -91,7 +90,7 @@ def ensure_session(svc: Any, cfg: Any, agent: AgentRecord) -> Any:return svc.store.create_session(provider=provider,model=model,- effort=effort or default_effort(provider),+ effort="",cwd=_workspace(cfg, agent),permission_mode=mode,title=agent.name,@@ -105,8 +104,8 @@ def ensure_session(svc: Any, cfg: Any, agent: AgentRecord) -> Any:updates: dict[str, str] = {}if getattr(existing, "account_id", "") != agent.account_id:updates["account_id"] = agent.account_id- if effort and existing.effort != effort:- updates["effort"] = effort+ if existing.effort:+ updates["effort"] = ""if updates:svc.store.update_session(session_id, **updates)existing = svc.store.get_session(session_id)@@ -179,7 +178,13 @@ def make_deliver_hook(message_id=env.event_id,sender_id=env.from_agent,sender_name=sender,- sender_kind=("jarvis" if env.from_agent == LEAD_AGENT_ID else "user" if env.from_agent == "user" else "agent"),+ sender_kind=(+ "jarvis"+ if env.from_agent == LEAD_AGENT_ID+ else "user"+ if env.from_agent == "user"+ else "agent"+ ),text=env.text,prompt=frame_incoming(env, sender),trace_id=env.trace_id,diff --git a/jarvis/ui/web/frontend/src/components/society/card/AgentSpecSheet.tsx b/jarvis/ui/web/frontend/src/components/society/card/AgentSpecSheet.tsxindex f034d21522..3b0c1038be 100644--- a/jarvis/ui/web/frontend/src/components/society/card/AgentSpecSheet.tsx+++ b/jarvis/ui/web/frontend/src/components/society/card/AgentSpecSheet.tsx@@ -379,7 +379,6 @@ export function AgentSpecSheet({ agent, onOpenChat, onRetired }: AgentSpecSheetP<span className="font-medium">{t("society.card.default_brain")}</span>)}{agent.model ? <span className="ac-prose font-mono text-xs">{agent.model}</span> : null}- {agent.effort ? <span className="text-xs text-muted-foreground">{agent.effort}</span> : null}</div>)}</section>diff --git a/jarvis/ui/web/frontend/src/components/society/card/LeadSections.tsx b/jarvis/ui/web/frontend/src/components/society/card/LeadSections.tsxindex 4a5c8e6f48..9f1c895a59 100644--- a/jarvis/ui/web/frontend/src/components/society/card/LeadSections.tsx+++ b/jarvis/ui/web/frontend/src/components/society/card/LeadSections.tsx@@ -48,7 +48,6 @@ export function LeadBrain() {<Badge variant="secondary" className="font-mono text-[11px]">{draft.model || t("society.chat.model_provider_default")}</Badge>- {draft.effort ? <Badge variant="outline">{draft.effort}</Badge> : null}<Badge variant="outline">{t("society.tier.lead")}</Badge></div><p className="text-[11px] text-muted-foreground">{t("society.card.brain_shared_hint")}</p>diff --git a/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx b/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsxindex 2ccda39862..52e4f10691 100644--- a/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx+++ b/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx@@ -4,7 +4,7 @@ import { mergeOutgoingMessages, useOutgoingMessages } from "@/components/agentch/*** The model card's chat column, kept deliberately plain (maintainer,* 2026-09-02): bubbles, a time stamp, one pill-shaped composer with a "+"- * for files and voice, the model and the thinking effort — and nothing else.+ * for files and voice, and the model — and nothing else.** For Jarvis the column speaks to the SAME store the front page and the* voice stage use (`useAgentChatStore`, the "jarvis" surface): one history,@@ -346,7 +346,6 @@ function JarvisChat({ agent, roster }: AgentChatPanelProps) {<div className="grid shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 border-b border-border px-3 py-2"><div className="flex min-w-0 items-center gap-2"><ModelPicker />- <EffortPicker /></div><JarvisModeSwitch mode={mode} onPick={pickMode} /><div className="flex items-center justify-end">@@ -559,41 +558,6 @@ function ModelPicker() {);}-function EffortPicker() {- const t = useT();- const draft = useAgentChat((s) => s.draft);- const providerById = useAgentChat((s) => s.providerById);- const setDraft = useAgentChat((s) => s.setDraft);- const locks = useAgentChat((s) => s.locks);- const provider = providerById(draft.provider);- const levels = provider?.effort_levels ?? [];- if (levels.length === 0) return null;- return (- <div role="radiogroup" aria-label={t("society.chat.effort")} className="inline-flex rounded-full border border-border p-0.5">- {levels.map((level) => {- const value = level || "";- const on = (draft.effort || "") === value;- return (- <button- key={level || "default"}- type="button"- role="radio"- aria-checked={on}- disabled={Boolean(locks?.effort)}- onClick={() => void setDraft({ effort: value })}- className={cn(- "rounded-full px-2 py-0.5 text-xs capitalize transition-colors disabled:opacity-60",- on ? "bg-secondary text-foreground" : "text-muted-foreground hover:text-foreground",- )}- >- {level || t("society.chat.effort_default")}- </button>- );- })}- </div>- );-}-// ---------------------------------------------------------------------------// transcript// ---------------------------------------------------------------------------diff --git a/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.test.tsx b/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.test.tsxindex a170143cdf..621c53a557 100644--- a/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.test.tsx+++ b/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.test.tsx@@ -213,18 +213,18 @@ test("clicking a model persists immediately, preserves the account and updates tmount(); await open();fireEvent.click(screen.getByTitle("openai-small"));await waitFor(() => expect(screen.getByRole("button", { name: "Model" }).textContent).toContain("openai-small"));- expect(posts).toEqual([{ provider: "openai", model: "openai-small", effort: "low", account_id: "saved-seat" }]);+ expect(posts).toEqual([{ provider: "openai", model: "openai-small", effort: "", account_id: "saved-seat" }]);expect(row.description).toBe("Keep my instructions");expect(saving.mock.calls.map((call) => call[0])).toEqual([true, false]);await open();expect(screen.getByTitle("openai-small").getAttribute("aria-checked")).toBe("true");});-test("changing provider resets the subscription account and uses a supported effort", async () => {+test("changing provider resets the subscription account and leaves effort automatic", async () => {mount(); await open();fireEvent.click(screen.getByTitle("gemini-small"));await waitFor(() => expect(posts).toHaveLength(1));- expect(posts[0]).toEqual({ provider: "gemini", model: "gemini-small", effort: "low", account_id: "" });+ expect(posts[0]).toEqual({ provider: "gemini", model: "gemini-small", effort: "", account_id: "" });});test("a failed save keeps the current model and permits retry", async () => {@@ -253,11 +253,11 @@ test("search filters by model and provider, and Escape closes without saving", aexpect(posts).toEqual([]);});-test("the effort submenu commits the model and chosen effort together", async () => {+test("the model menu has no manual effort control", async () => {mount(); await open();- fireEvent.click(within(screen.getByRole("group", { name: "gemini · API key" })).getByRole("button", { name: "Thinking effort: Large" }));- fireEvent.click(within(screen.getByRole("menu", { name: "Thinking effort" })).getByRole("menuitemradio", { name: "Medium" }));- await waitFor(() => expect(posts[0]).toEqual({ provider: "gemini", model: "gemini-large", effort: "medium", account_id: "" }));+ expect(screen.queryByRole("button", { name: /Thinking effort/ })).toBeNull();+ fireEvent.click(screen.getByTitle("gemini-large"));+ await waitFor(() => expect(posts[0]).toEqual({ provider: "gemini", model: "gemini-large", effort: "", account_id: "" }));});test("OpenCode models are offered without a duplicate app-managed login", async () => {@@ -365,7 +365,7 @@ test("hidden OpenCode models remain selectable through search and a reopened menexpect(screen.queryByTitle("opencode-large")).toBeNull();fireEvent.change(reopened, { target: { value: "opencode large" } });fireEvent.click(screen.getByTitle("opencode-large"));- await waitFor(() => expect(posts[0]).toEqual({ provider: "opencode", model: "opencode-large", effort: "high", account_id: "" }));+ await waitFor(() => expect(posts[0]).toEqual({ provider: "opencode", model: "opencode-large", effort: "", account_id: "" }));});test.each([diff --git a/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsx b/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsxindex 503114f571..75ecd9fdcf 100644--- a/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsx+++ b/jarvis/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsx@@ -2,21 +2,20 @@ import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState, type CSSPimport { createPortal } from "react-dom";import { Check, ChevronDown, ChevronRight, Loader2, RefreshCw, Search, Users } from "lucide-react";import { ProviderLogo } from "@/components/providers/ProviderLogo";-import { effortLabel } from "@/components/agentchat/AgentComposer";import { useAgentChat } from "@/components/agentchat/AgentChatStoreContext";import { useT } from "@/i18n";import type { CuratedModel } from "@/lib/agentChatApi";import { cn } from "@/lib/utils";-import { effortsFor, type BrainSeat } from "../create/brainPicker";+import { type BrainSeat } from "../create/brainPicker";import { useUpdateAgentModel, type SocietyAgent } from "../data";-import { collapsibleModels, matchesModel, modelEffort, modelGroupOrder, modelSeats, providerTitle, visibleModels } from "./modelChoices";+import { collapsibleModels, matchesModel, modelGroupOrder, modelSeats, providerTitle, visibleModels } from "./modelChoices";import { useModelMenuData } from "./useModelMenuData";-type Submenu = { provider: string; model?: CuratedModel; anchor: DOMRect };+type Submenu = { provider: string; anchor: DOMRect };const menuRow = "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13px] text-popover-foreground hover:bg-secondary focus-visible:bg-secondary focus-visible:outline-none disabled:opacity-45";-/** A searchable provider catalog, with account and effort submenus. */+/** A searchable provider catalog with account selection. */export function AgentModelPicker({ agent, busy, onSavingChange }: {agent: SocietyAgent; busy: boolean; onSavingChange: (saving: boolean) => void;}) {@@ -48,7 +47,6 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {const defaultModelLabel = t("agent_chat.model_default");const seats = useMemo(() => modelSeats(options, providers ?? [], live, defaultModelLabel), [options, providers, live, defaultModelLabel]);const currentAccount = (seat: BrainSeat) => accounts[seat.provider.id] ?? (agent.provider === seat.provider.id ? agent.accountId ?? "" : "");- const preferredEffort = (seat: BrainSeat, model: CuratedModel) => modelEffort(seat, model.id, seat.provider.id === agent.provider ? agent.effort : seat.provider.default_effort);// useT returns a new function each render; memoize by its actual labels.const titleKey = JSON.stringify(seats.map((seat) => providerTitle(seat, t)));const groups = useMemo(() => {@@ -135,11 +133,11 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {return () => document.removeEventListener("pointerdown", outside);}, [open]);- async function save(seat: BrainSeat, model: CuratedModel, effort = preferredEffort(seat, model)) {+ async function save(seat: BrainSeat, model: CuratedModel) {if (busy || inFlight.current) return;inFlight.current = true; setSaving(true); onSavingChange(true); setError(null);try {- await update(agent.agentId, { provider: seat.provider.id, model: model.id, effort, account_id: currentAccount(seat) });+ await update(agent.agentId, { provider: seat.provider.id, model: model.id, effort: "", account_id: currentAccount(seat) });setOpen(false); setSubmenu(null); trigger.current?.focus();} catch (err) {setError(`${t("society.chat.model_save_failed")} (${err instanceof Error ? err.message : String(err)})`);@@ -182,7 +180,6 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {className="flex max-w-full items-center gap-1.5 rounded-full px-2 py-1 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50">{agent.provider ? <ProviderLogo providerId={agent.provider} label={agent.providerLabel} size="sm" /> : null}<span className="truncate">{agent.model || agent.providerLabel || t("society.chat.model_default")}</span>- {agent.effort ? <span className="shrink-0 opacity-70">{effortLabel(agent.effort, t)}</span> : null}<ChevronDown className="h-3 w-3 shrink-0" aria-hidden /></button>{host && (open || !loading) ? createPortal(<>@@ -215,7 +212,7 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {<span className="truncate">{title}</span><span className="ml-auto">{models.length}</span></button> : <span className="min-w-0 flex-1 truncate text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" title={title}>{title}</span>}{seat.accounts.length ? <button type="button" disabled={busy || saving} data-menu-choice- aria-label={`${t("society.chat.model_account")}: ${title}`} aria-haspopup="menu" aria-expanded={submenu?.provider === seat.provider.id && !submenu.model}+ aria-label={`${t("society.chat.model_account")}: ${title}`} aria-haspopup="menu" aria-expanded={submenu?.provider === seat.provider.id}onClick={(event) => setSubmenu({ provider: seat.provider.id, anchor: event.currentTarget.getBoundingClientRect() })}className="flex max-w-[140px] items-center gap-1 rounded px-1 py-0.5 text-[10px] text-muted-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"><Users className="h-3 w-3 shrink-0" aria-hidden /><span className="truncate">{seat.accounts.find((account) => account.id === currentAccount(seat))?.label ?? t("society.chat.model_active_account")}</span><ChevronDown className="h-2.5 w-2.5 shrink-0" aria-hidden />@@ -223,24 +220,12 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {</div><div id={choicesId}>{shown.map((model) => {const selected = agent.provider === seat.provider.id && agent.model === model.id && (agent.accountId ?? "") === currentAccount(seat);- const effort = preferredEffort(seat, model);return <div key={model.id} className={cn("group flex items-center", selected && "bg-secondary/70")}><button type="button" role="menuitemradio" aria-checked={selected} disabled={busy || saving} data-menu-choice- onKeyDown={(event) => {- if (event.key === "ArrowRight" && effortsFor(seat, model.id).length) {- event.preventDefault(); event.stopPropagation();- setSubmenu({ provider: seat.provider.id, model, anchor: event.currentTarget.getBoundingClientRect() });- }- }}onClick={() => void save(seat, model)} className={cn(menuRow, "min-w-0 flex-1")} title={model.id}>- <span className="min-w-0 truncate">{model.label || model.id}<span className="ml-1 text-muted-foreground">{effort ? effortLabel(effort, t) : ""}</span></span>+ <span className="min-w-0 truncate">{model.label || model.id}</span>{selected ? <Check className="ml-auto h-3.5 w-3.5 shrink-0" aria-hidden /> : null}</button>- {effortsFor(seat, model.id).length ? <button type="button" disabled={busy || saving} aria-label={`${t("society.chat.effort")}: ${model.label}`} aria-haspopup="menu"- onClick={(event) => setSubmenu({ provider: seat.provider.id, model, anchor: event.currentTarget.getBoundingClientRect() })}- className="mr-1 rounded p-1.5 text-muted-foreground opacity-60 hover:bg-secondary hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">- <ChevronRight className="h-3 w-3" aria-hidden />- </button> : null}</div>;})}</div>{foldable && !isRouter && (isExpanded || shown.length < models.length) ? <button type="button" data-menu-choice@@ -259,14 +244,10 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {</button></div></div>- {open && submenu && sideSeat ? <div ref={sidePanel} style={sideStyle} role="menu" aria-label={t(submenu.model ? "society.chat.effort" : "society.chat.model_account")}+ {open && submenu && sideSeat ? <div ref={sidePanel} style={sideStyle} role="menu" aria-label={t("society.chat.model_account")}className="z-[81] overflow-y-auto rounded-md border border-border bg-popover py-1 shadow-float" onKeyDown={(event) => moveFocus(event, sidePanel.current)}>- <p className="px-3 py-2 text-[11px] font-semibold uppercase text-muted-foreground">{submenu.model ? t("society.chat.effort") : t("society.chat.model_account")}</p>- {submenu.model ? effortsFor(sideSeat, submenu.model.id).map((effort) => <button key={effort} type="button" role="menuitemradio" data-menu-choice- aria-checked={effort === preferredEffort(sideSeat, submenu.model!)} disabled={busy || saving}- onClick={() => void save(sideSeat, submenu.model!, effort)} className={menuRow}>- {effortLabel(effort, t)}{effort === preferredEffort(sideSeat, submenu.model!) ? <Check className="ml-auto h-3.5 w-3.5" aria-hidden /> : null}- </button>) : [{ id: "", label: t("society.chat.model_active_account") }, ...sideSeat.accounts].map((account) => <button key={account.id} type="button" role="menuitemradio" data-menu-choice+ <p className="px-3 py-2 text-[11px] font-semibold uppercase text-muted-foreground">{t("society.chat.model_account")}</p>+ {[{ id: "", label: t("society.chat.model_active_account") }, ...sideSeat.accounts].map((account) => <button key={account.id} type="button" role="menuitemradio" data-menu-choicearia-checked={account.id === currentAccount(sideSeat)} disabled={busy || saving}onClick={() => { setAccounts((previous) => ({ ...previous, [sideSeat.provider.id]: account.id })); setSubmenu(null); input.current?.focus(); }} className={menuRow}><span className="truncate">{account.label}</span>{account.id === currentAccount(sideSeat) ? <Check className="ml-auto h-3.5 w-3.5" aria-hidden /> : null}diff --git a/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx b/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsxindex 193d43bd23..a8c7b9361e 100644--- a/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx+++ b/jarvis/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx@@ -8,7 +8,7 @@* connected on this machine, subscriptions first (a CLI on a plan bills the* plan, not per token), then saved API keys, then local models, with the* login to use when a CLI has more than one, the model (a keyed row's live- * list, Ollama's installed models) and the effort; and a "More" disclosure+ * list, Ollama's installed models); and a "More" disclosure* for the permission ceiling and the daily budget (a switch: off stores 0,* which the scheduler reads as no cap). A provider that is not* connected is not listed — a local row counts as connected only when it@@ -29,7 +29,6 @@ import * as Dialog from "@radix-ui/react-dialog";import { useQuery } from "@tanstack/react-query";import { ChevronDown, Shuffle, Upload, X } from "lucide-react";-import { effortLabel } from "@/components/agentchat/AgentComposer";import { AgentMark } from "@/components/agentic/AgentMark";import { ProviderLogo } from "@/components/providers/ProviderLogo";import { Button } from "@/components/ui/button";@@ -53,7 +52,6 @@ import {accountChoice,accountHint,defaultSeat,- effortsFor,modelsFor,type BrainKind,type BrainSeat,@@ -123,7 +121,6 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialoconst [style, setStyle] = useState<string>(DEFAULT_STYLE);const [providerId, setProviderId] = useState("");const [model, setModel] = useState("");- const [effort, setEffort] = useState("");const [accountId, setAccountId] = useState("");const [ceiling, setCeiling] = useState<PermissionCeiling>("monitor");const [budget, setBudget] = useState("2");@@ -207,12 +204,10 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialo}, [catalog.data, connections.data, societyProviders.data, keylessModels.data, liveModels, defaultModelLabel]);const seat = seats.find((s) => s.provider.id === providerId) ?? null;const accounts = accountChoice(seat);- const efforts = effortsFor(seat, model);const pickSeat = (next: BrainSeat | null) => {setProviderId(next?.provider.id ?? "");setModel(next ? next.provider.default_model || modelsFor(next)[0]?.id || "" : "");- setEffort(next?.provider.default_effort ?? "");setAccountId("");};@@ -223,13 +218,6 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialo// eslint-disable-next-line react-hooks/exhaustive-deps}, [seats, providerId]);- // A model change can leave the picked effort off that model's ladder.- useEffect(() => {- if (efforts.length && !efforts.includes(effort)) setEffort(seat?.provider.default_effort ?? efforts[0]);- if (!efforts.length && effort) setEffort("");- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [efforts.join("|")]);-useEffect(() => {if (!open) return;setName("");@@ -238,7 +226,6 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialosetRecipe(defaultRecipe(DEFAULT_STYLE));setProviderId("");setModel("");- setEffort("");setAccountId("");setImportProblems(null);setImportedName(null);@@ -361,7 +348,7 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialoprovider: seat?.provider.id ?? "",providerLabel: seat?.provider.label ?? t("society.create.provider_unknown"),model,- effort,+ effort: "",accountId,// Every tool Jarvis has connected; what the agent reaches for first// is settled in its own chat afterwards (maintainer, 2026-09-02).@@ -544,22 +531,6 @@ export function CreateAgentDialog({ open, onClose, onCreated }: CreateAgentDialo/>)}</div>- {efforts.length > 0 ? (- <div>- <span className={labelClass}>{t("society.create.effort")}</span>- <Combobox- value={effort}- groups={[- {- id: "efforts",- options: efforts.map((lvl) => ({ value: lvl, label: effortLabel(lvl, t) })),- },- ]}- onChange={setEffort}- ariaLabel={t("society.create.effort")}- />- </div>- ) : null}</div></div>)}diff --git a/jarvis/ui/web/society_routes.py b/jarvis/ui/web/society_routes.pyindex 6c3c6577d8..f67f4ae1a4 100644--- a/jarvis/ui/web/society_routes.py+++ b/jarvis/ui/web/society_routes.py@@ -169,7 +169,9 @@ async def list_agents(request: Request, include_archived: bool = False) -> dict[@router.post("/agents")async def create_agent(body: CreateAgentBody, request: Request) -> dict[str, Any]:rt = await _runtime(request)- fields = body.model_dump(exclude_none=True, exclude={"name", "title", "description", "tier"})+ fields = body.model_dump(+ exclude_none=True, exclude={"name", "title", "description", "tier", "effort"}+ )derived_focus, derived_rules = rt.derive(body.title, body.description)if body.focus is None and derived_focus:fields["focus"] = derived_focus@@ -208,7 +210,7 @@ async def patch_agent(agent_id: str, body: PatchAgentBody, request: Request) ->agent = await rt.roster.resolve(agent_id)if agent is None:raise HTTPException(404, {"reason": str(FailureReason.TARGET_UNKNOWN)})- fields = body.model_dump(exclude_none=True)+ fields = body.model_dump(exclude_none=True, exclude={"effort"})if ("title" in fields or "description" in fields) and "focus" not in fields:# A prose edit must not wipe what the agent earned in its chat: the# derived focus is APPENDED to the existing order (existing first,@@ -543,7 +545,7 @@ async def switch_agent_model(agent_id: str, body: ModelBody, request: Request) -fields = {"provider": body.provider.strip().lower(),"model": body.model.strip(),- "effort": body.effort.strip(),+ "effort": "","account_id": body.account_id.strip(),}chat = rt._get_chat()diff --git a/tests/unit/agent_chat/test_agent_chat_ladders.py b/tests/unit/agent_chat/test_agent_chat_ladders.pyindex a0e63f3617..5a4dca6823 100644--- a/tests/unit/agent_chat/test_agent_chat_ladders.py+++ b/tests/unit/agent_chat/test_agent_chat_ladders.py@@ -10,6 +10,7 @@ import pytestfrom jarvis.agent_chat import permissions, runner_clifrom jarvis.agent_chat.catalog import CODEX_FALLBACK_MODELS, provider_row+from jarvis.agent_chat.effort import automatic_society_effortfrom jarvis.agent_chat.runner_cli import (_AgyState,agy_model_args,@@ -24,6 +25,45 @@ from jarvis.plugins.brain._anthropic_base import _is_reasoning_model, reasoning_# ------------------------------------------------------------ permissions+def test_society_effort_follows_the_current_task():+ assert automatic_society_effort("Hi") == "low"+ assert (+ automatic_society_effort("Summarize the changes and explain their impact for the team.")+ == "low"+ )+ assert (+ automatic_society_effort(+ "Please review the implementation and identify the likely cause "+ "before proposing a fix with tests."+ )+ == "medium"+ )+ assert (+ automatic_society_effort(+ "1. Inspect the logs\n2. Find the regression\n3. Fix and verify it"+ )+ == "high"+ )+ assert (+ automatic_society_effort("Scheduled routine abc. Follow instructions.\n\nReply OK.")+ == "low"+ )+++def test_new_agy_gemini_base_keeps_required_effort_without_a_catalog():+ stale = [{"id": "gemini-3.7-flash", "efforts": ["low", "medium", "high"]}]+ assert agy_model_args("gemini-3.8-flash", "", stale) == [+ "--model",+ "gemini-3.8-flash",+ "--effort",+ "medium",+ ]+ assert agy_model_args(+ "gemini-3.8-flash", "high", [{"id": "gemini-3.8-flash", "efforts": []}]+ ) == ["--model", "gemini-3.8-flash", "--effort", "high"]+ assert agy_model_args("gemini-3.8-flash-high", "", []) == ["--model", "gemini-3.8-flash-high"]++async def test_agy_cold_chat_resolves_catalog_before_building_command(tmp_path, monkeypatch):seen = []@@ -53,6 +93,35 @@ async def test_agy_cold_chat_resolves_catalog_before_building_command(tmp_path,assert result.error == "stop before process launch"[email protected]("runner", ["agy-cli", "codex-cli", "grok-cli"])+async def test_society_cli_effort_is_chosen_for_each_turn(tmp_path, monkeypatch, runner):+ seen = []++ def planner(**kwargs):+ seen.append(kwargs["effort"])+ raise runner_cli.CliUnavailable("stop before process launch")++ monkeypatch.setitem(runner_cli._PLANNERS, runner, planner)+ if runner == "agy-cli":+ monkeypatch.setattr(runner_cli, "read_agy_models", lambda: [])+ handle = SimpleNamespace(+ session=SimpleNamespace(+ session_id="society:scout",+ surface="society",+ cwd=str(tmp_path),+ provider="antigravity" if runner == "agy-cli" else "openai-codex",+ model="",+ effort="high",+ permission_mode="plan",+ )+ )+ await runner_cli._run_cli_once(handle, "Hi", runner, None)+ await runner_cli._run_cli_once(+ handle, "1. Inspect the logs\n2. Find the cause\n3. Fix and verify it", runner, None+ )+ assert seen == ["low", "high"]++def test_every_runner_has_a_ladder_with_its_default_on_it():for runner in ("claude-cli", "codex-cli", "agy-cli", "grok-cli", "api", "jarvis"):ids = permissions.permission_ids(runner)@@ -295,7 +364,7 @@ def test_agy_model_catalog_folds_suffixed_ids():assert by_id["claude-sonnet-4-6"]["efforts"] == []assert by_id["gpt-oss-120b"]["efforts"] == ["medium"]# No list at all -> the fallback table.- assert agy_model_catalog(None)[0]["id"] == "gemini-3.7-flash"+ assert agy_model_catalog(None)[0]["id"] == "gemini-3.8-flash"# ------------------------------------------------------------ agy translation@@ -474,7 +543,7 @@ def test_catalog_rows_carry_per_model_efforts_for_cli_runners():agy = provider_row("antigravity")assert agy is not Nonemodels = agy.to_dict()["curated_models"]- assert models[0]["id"] == "gemini-3.7-flash" and models[0]["efforts"] == [+ assert models[0]["id"] == "gemini-3.8-flash" and models[0]["efforts"] == ["low","medium","high",diff --git a/tests/unit/society/test_chat_binding.py b/tests/unit/society/test_chat_binding.pyindex e93adb6a49..a3dd4c15cd 100644--- a/tests/unit/society/test_chat_binding.py+++ b/tests/unit/society/test_chat_binding.py@@ -76,6 +76,17 @@ async def test_ensure_session_is_deterministic_and_reseats(world):assert reseated.session_id == "society:scout"+async def test_ensure_session_clears_legacy_effort(world):+ rt, svc, cfg = world+ scout, _ = await rt.roster.create(+ name="Scout", provider="antigravity", model="gemini-3.8-flash", effort="high"+ )+ first = ensure_session(svc, cfg, scout)+ assert first.effort == ""+ svc.store.update_session(first.session_id, effort="low")+ assert ensure_session(svc, cfg, scout).effort == ""++async def test_ceiling_maps_to_stance(world):rt, svc, cfg = worldsafe, _ = await rt.roster.create(name="Reader", provider="openai", permission_ceiling="safe")diff --git a/tests/unit/society/test_subscriptions.py b/tests/unit/society/test_subscriptions.pyindex 8e6eef493e..f76a9fd1a0 100644--- a/tests/unit/society/test_subscriptions.py+++ b/tests/unit/society/test_subscriptions.py@@ -119,7 +119,7 @@ class FakeService:return False-async def test_ensure_session_follows_account_and_effort(tmp_path: Path):+async def test_ensure_session_follows_account_and_uses_automatic_effort(tmp_path: Path):rt = SocietyRuntime(tmp_path, seed_starter_team=False)await rt.ensure_started()svc = FakeService(AgentChatStore(tmp_path / "chat.db"))@@ -129,7 +129,7 @@ async def test_ensure_session_follows_account_and_effort(tmp_path: Path):name="Scout", provider="openai", model="gpt-5", account_id="", effort="high")first = ensure_session(svc, cfg, scout)- assert first.account_id == "" and first.effort == "high"+ assert first.account_id == "" and first.effort == ""moved = await rt.roster.update("scout", {"provider": "claude-api", "model": "claude-opus-5", "account_id": "seat-2"})@@ -171,7 +171,13 @@ def test_providers_and_model_switch_over_rest(client, monkeypatch):assert by_id["openai-codex"]["platform"] == "codex"assert isinstance(by_id["openai-codex"]["accounts"], list)- c.post("/api/society/agents", json={"name": "Scout", "provider": "openai", "model": "gpt-5"})+ created = c.post(+ "/api/society/agents",+ json={"name": "Scout", "provider": "openai", "model": "gpt-5", "effort": "high"},+ )+ assert created.json()["agent"]["effort"] == ""+ patched = c.patch("/api/society/agents/scout", json={"effort": "low"})+ assert patched.json()["agent"]["effort"] == ""res = c.post("/api/society/agents/scout/model",json={"provider": "gemini", "model": "gemini-3-pro", "effort": "medium", "account_id": ""},@@ -183,6 +189,7 @@ def test_providers_and_model_switch_over_rest(client, monkeypatch):assert body["reseated"] == "society:scout"session = svc.store.get_session("society:scout")assert session.provider == "gemini" and session.model == "gemini-3-pro"+ assert session.effort == ""bad = c.post("/api/society/agents/scout/model", json={"provider": "no-such-provider"})assert bad.status_code == 422listed = c.get("/api/society/agents/scout").json()["agent"]