upgrade Claude to Opus 4.6 with effort levels (#256)

* upgrade Claude to Opus 4.6 with --effort max for --max mode

- mini: haiku → sonnet
- auto: opusplan → opus (Opus 4.6)
- max: opus → opus + --effort max (Opus 4.6 max effort)
- bump @anthropic-ai/claude-agent-sdk 0.2.7 → 0.2.39

Co-authored-by: Cursor <cursoragent@cursor.com>

* update action lockfile for claude-agent-sdk 0.2.39

Co-authored-by: Cursor <cursoragent@cursor.com>

* add tool_use_summary handler for SDK 0.2.39

Co-authored-by: Cursor <cursoragent@cursor.com>

* integrate gpt-5.3-codex with runtime model availability detection

checks GET /v1/models at agent start to determine if gpt-5.3-codex is
available for the API key, falling back to gpt-5.2-codex when it isn't.
model resolution runs concurrently with CLI install for zero added latency.
also bumps @openai/codex-sdk from 0.80.0 to 0.98.0.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Colin McDonnell
2026-02-10 23:34:13 +00:00
committed by pullfrog[bot]
parent 19df8372cd
commit f37d02b292
6 changed files with 134 additions and 44 deletions
+18 -9
View File
@@ -17,16 +17,18 @@ import { type AgentRunContext, agent } from "./shared.ts";
// model selection based on effort level
// these are aliases that always resolve to the latest version
const claudeEffortModels: Record<Effort, string> = {
mini: "haiku",
auto: "opusplan",
mini: "sonnet",
auto: "opus",
max: "opus",
};
// FUTURE: Consider using Anthropic's "effort" parameter (beta) with Opus.
// This would allow a single model with effort levels ("low", "medium", "high") controlling
// token spend across responses, tool calls, and thinking. Requires beta header "effort-2025-11-24".
// See: https://platform.claude.com/docs/en/build-with-claude/effort
// This approach could replace model selection if effort proves effective for controlling capability.
// Claude Code CLI --effort level per pullfrog effort
// null = use default (high). "max" is Opus 4.6 only.
const claudeEffortLevels: Record<Effort, string | null> = {
mini: null,
auto: null,
max: "max",
};
/**
* Build disallowedTools list from payload permissions.
@@ -81,9 +83,10 @@ export const claude = agent({
// install CLI at start of run
const cliPath = await installClaude();
// select model based on effort level
// select model and effort level
const model = claudeEffortModels[ctx.payload.effort];
log.info(`» using model: ${model} (effort: ${ctx.payload.effort})`);
const effortLevel = claudeEffortLevels[ctx.payload.effort];
log.info(`» using model: ${model}${effortLevel ? ` (effort: ${effortLevel})` : ""}`);
// build disallowedTools based on tool permissions
const disallowedTools = buildDisallowedTools(ctx);
@@ -110,6 +113,11 @@ export const claude = agent({
"--verbose",
];
// add --effort flag if specified (e.g. "max" for Opus 4.6)
if (effortLevel) {
args.push("--effort", effortLevel);
}
// add disallowed tools if any
if (disallowedTools.length > 0) {
args.push("--disallowedTools");
@@ -301,5 +309,6 @@ const messageHandlers: SDKMessageHandlers = {
system: () => {},
stream_event: () => {},
tool_progress: () => {},
tool_use_summary: () => {},
auth_status: () => {},
};