fix(#3039): clamp max/xhigh effort to high for Claude-runtime skills (#3119)

* fix(#3039): clamp max/xhigh effort to high for Claude-runtime skills

effort: max in plan-phase, execute-phase, and autonomous SKILL.md frontmatter
was passed through as output_config.effort, which the Anthropic API rejects
when extended thinking is disabled (400: effort 'max' is not supported when
thinking is disabled on this model). The frontmatter is static at install
time and the installer cannot know whether thinking will be on or off at
invocation.

normalizeClaudeSkillEffort now clamps both 'max' and 'xhigh' to 'high' —
the maximum value that works in both thinking states on all supported models.
Applied in both src/runtime-artifact-conversion.cts and bin/install.js.

* chore(#3039): backfill changeset PR number 3119

* fix(#3039): regenerate skills with clamped effort: high

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-06 10:20:22 -04:00
committed by GitHub
parent 077028584f
commit b181c2f8c3
9 changed files with 53 additions and 29 deletions

View File

@@ -391,7 +391,13 @@ function skillFrontmatterName(skillDirName) {
}
function normalizeClaudeSkillEffort(effort) {
return effort === 'xhigh' ? 'max' : effort;
// #3039: `max` is rejected by Anthropic models when extended thinking is
// disabled (400: output_config.effort 'max' is not supported when thinking
// is disabled). The frontmatter is static at install time and the installer
// cannot know whether thinking will be on or off at invocation. `high` is the
// maximum value that works in both states on all supported models.
if (effort === 'xhigh' || effort === 'max') return 'high';
return effort;
}
/**