Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"dependencies": {
"@agentclientprotocol/sdk": "^1.2.1",
"@anthropic-ai/claude-agent-sdk": "^0.3.218",
"@anthropic-ai/claude-agent-sdk": "^0.3.219",
"@aparajita/capacitor-secure-storage": "^8.0.0",
"@capacitor/app": "^8.1.0",
"@capacitor/push-notifications": "^8.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/agents-usage/src/clientVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* one), so these values rot. Bump them here when a provider starts rejecting
* requests; the host can also override via `HostPort.clientVersions`.
*
* Last reviewed: 2026-06-23.
* Last reviewed: 2026-07-24.
*/
export const DEFAULT_CLIENT_VERSIONS = {
claudeCode: "2.1.186",
claudeCode: "2.1.219",
codex: "0.50.0",
copilotChat: "0.26.7",
editor: "vscode/1.96.2",
Expand Down
74 changes: 37 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ nodeLinker: hoisted

minimumReleaseAgeExclude:
# Claude steering relies on the current official SDK lifecycle controls.
- "@anthropic-ai/claude-agent-sdk@0.3.219"
- "@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.219"
- "@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.219"
- "@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.219"
- "@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.219"
- "@anthropic-ai/claude-agent-sdk-linux-x64@0.3.219"
- "@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.219"
- "@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.219"
- "@anthropic-ai/claude-agent-sdk-win32-x64@0.3.219"
# Retain the previous release while pnpm validates the pre-update lockfile.
- "@anthropic-ai/claude-agent-sdk@0.3.218"
- "@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.218"
- "@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.218"
Expand Down
17 changes: 17 additions & 0 deletions src/renderer/components/providers/claude/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import "./index";

const capabilities = {
models: [
{ id: "claude-opus-5", label: "Opus 5" },
{ id: "claude-fable-5", label: "Fable 5" },
{ id: "haiku", label: "Haiku" },
],
efforts: ["low", "medium", "high", "xHigh", "max", "ultracode"],
defaultEffort: "high",
modelEfforts: {
"claude-opus-5": ["low", "medium", "high", "xHigh", "max", "ultracode"],
"claude-fable-5": ["low", "medium", "high", "xHigh", "max", "ultracode"],
haiku: [],
},
Expand All @@ -38,6 +40,21 @@ function isPermissionControl(
}

describe("Claude composer controls", () => {
it("allows auto permissions for Opus 5", () => {
const controls = getComposerControls("claude")?.({
capabilities,
config: { model: "claude-opus-5" },
isDisabled: false,
onConfigChange: () => undefined,
});

const permission = controls?.find(isPermissionControl);
expect(permission && "options" in permission ? permission.options : []).toContainEqual({
id: "auto",
label: "Auto mode",
});
});

it("allows auto permissions for Fable 5", () => {
const controls = getComposerControls("claude")?.({
capabilities,
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/providers/claude/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ registerConflictResolverDefaults(PROVIDER_KIND, {
// Filter it out for Haiku and other models that don't support it.
const AUTO_CAPABLE_MODELS = new Set([
"sonnet",
"claude-opus-5",
"claude-fable-5",
"claude-opus-4-6",
"claude-opus-4-7",
Expand Down
1 change: 1 addition & 0 deletions src/supervisor/agents/claude/argv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { applyClaudeContextSuffix } from "./argv";

describe("applyClaudeContextSuffix", () => {
it("derives the suffix from contextSize for built-in models", () => {
expect(applyClaudeContextSuffix("claude-opus-5", "1m")).toBe("claude-opus-5[1m]");
expect(applyClaudeContextSuffix("claude-opus-4-8", "1m")).toBe("claude-opus-4-8[1m]");
expect(applyClaudeContextSuffix("claude-opus-4-8", "200k")).toBe("claude-opus-4-8");
expect(applyClaudeContextSuffix("claude-opus-4-8")).toBe("claude-opus-4-8");
Expand Down
15 changes: 13 additions & 2 deletions src/supervisor/agents/claude/claude.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,19 @@ describe("claudeCapabilities", () => {
expect(claudeCapabilities.fastModels).not.toContain("claude-fable-5");
});

it("lists Fable 5 first so it is the default for new threads", () => {
expect(claudeCapabilities.models[0]).toEqual({ id: "claude-fable-5", label: "Fable 5" });
it("lists Opus 5 first at high effort so it is the default for new threads", () => {
expect(claudeCapabilities.models[0]).toEqual({ id: "claude-opus-5", label: "Opus 5" });
expect(claudeCapabilities.defaultEffort).toBe("high");
expect(claudeCapabilities.modelEfforts["claude-opus-5"]).toEqual([
"low",
"medium",
"high",
"xHigh",
"max",
"ultracode",
]);
expect(claudeCapabilities.modelContextSizes?.["claude-opus-5"]).toEqual(["1m"]);
expect(claudeCapabilities.fastModels).toContain("claude-opus-5");
});

it("surfaces Sonnet 5 with frontier effort tiers", () => {
Expand Down
53 changes: 12 additions & 41 deletions src/supervisor/agents/claude/detection.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { compactAgentProviderMetadata, type AgentCapability } from "@/shared/contracts";
import { CLAUDE_EFFORT_TIERS } from "@/shared/agents/claudeEfforts";
import { readAgentCommandOutput, type DetectionSpec, type StatusProbeResult } from "../base";
import { getAgentProbeCwd } from "../probeCwd";
import {
CLAUDE_BUILTIN_FAST_MODELS,
CLAUDE_BUILTIN_MODEL_CONTEXT_SIZES,
CLAUDE_BUILTIN_MODEL_EFFORTS,
CLAUDE_BUILTIN_MODELS,
CLAUDE_PREMIUM_EFFORT_TIERS,
} from "./models";
import { probeClaudeCapabilities } from "./probe";

/** Default `--permission-mode` when `ThreadConfig.approvalPolicy` is omitted. */
Expand All @@ -21,55 +27,20 @@ const CLAUDE_BUILT_IN_SLASH_COMMANDS: AgentCapability["slashCommands"] = [
},
];

/** Effort tiers shared by the frontier models (Opus 4.7/4.8 and Fable 5). */
const PREMIUM_EFFORT_TIERS: string[] = [...CLAUDE_EFFORT_TIERS];

/**
* Master switch for the Fable 5 model. Flip to `false` to hide it from the
* model pickers while keeping its effort/context/auto metadata ready below.
*/
const FABLE_5_ENABLED = true;
const SONNET_5_MODEL_ID = "claude-sonnet-5";

export const claudeCapabilities: AgentCapability = {
models: [
...(FABLE_5_ENABLED ? [{ id: "claude-fable-5", label: "Fable 5" }] : []),
{ id: "claude-opus-4-8", label: "Opus 4.8" },
{ id: "claude-opus-4-7", label: "Opus 4.7" },
{ id: "claude-opus-4-6", label: "Opus 4.6" },
{ id: SONNET_5_MODEL_ID, label: "Sonnet 5" },
{ id: "haiku", label: "Haiku" },
],
efforts: PREMIUM_EFFORT_TIERS,
models: CLAUDE_BUILTIN_MODELS,
efforts: CLAUDE_PREMIUM_EFFORT_TIERS,
defaultEffort: "high",
modelEfforts: {
"claude-fable-5": PREMIUM_EFFORT_TIERS,
"claude-opus-4-8": PREMIUM_EFFORT_TIERS,
"claude-opus-4-7": PREMIUM_EFFORT_TIERS,
"claude-opus-4-6": ["low", "medium", "high", "max"],
[SONNET_5_MODEL_ID]: PREMIUM_EFFORT_TIERS,
haiku: [],
},
modelEfforts: CLAUDE_BUILTIN_MODEL_EFFORTS,
contextSizes: [
{ id: "200k", label: "200k" },
{ id: "1m", label: "1M" },
],
// Order matters: the first entry is the per-model default. Frontier models
// default to 1M (the long-context build users select these for).
modelContextSizes: {
"claude-fable-5": ["1m"],
"claude-opus-4-8": ["1m", "200k"],
"claude-opus-4-7": ["1m", "200k"],
"claude-opus-4-6": ["1m", "200k"],
[SONNET_5_MODEL_ID]: ["1m"],
// Legacy `sonnet` alias — dropped from the picker (replaced by Sonnet 5) but
// still used by commit-gen defaults and pre-rename threads, so keep it
// context-managed (200k default) for backward compatibility. Its presence
// here is what keeps it in CLAUDE_CONTEXT_MANAGED_MODEL_IDS below.
sonnet: ["200k", "1m"],
},
modelContextSizes: CLAUDE_BUILTIN_MODEL_CONTEXT_SIZES,
defaultContextSize: "200k",
fastModels: ["claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6"],
fastModels: CLAUDE_BUILTIN_FAST_MODELS,
modes: ["agent", "plan"],
approvalPolicies: [
{ id: "default", label: "Default" },
Expand Down
Loading