fix: stop defaulting reasoning effort per model (1.4.1) - #91
Merged
Conversation
v1.4.0 gave every friendly alias a `high` default effort. That duplicates a catalog the host CLI owns, exactly like the pinned model IDs that release removed, and it is wrong for `haiku` — Haiku 4.5 is not in the reasoning-effort model tier. Delete `DEFAULT_EFFORT_BY_MODEL` / `resolveDefaultEffort` at the shared boundary so `buildArgs()` is the only thing that emits the flag. `--model` still defaults to `opus`; effort is forwarded only when the user asks for it, and each model keeps whatever Claude Code defaults to. Also gate `--model` / `--effort` on their resolved values. Both resolvers return undefined for whitespace-only input, which previously reached spawn() argv as undefined and threw ERR_INVALID_ARG_TYPE. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
32b57d6 < |
2026-07-29 08:32 UTC | 0 | 0 | 0 |
Last scanned: 32b57d6 · 2026-07-29 08:32 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
32b57d6 < |
2026-07-29 08:32 UTC | 0 | 0 | 0 |
Last scanned: 32b57d6 · 2026-07-29 08:32 UTC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
v1.4.0 gave every friendly model alias a
highdefault effort. Two things wrong with that:"effortLevel": "xhigh"in~/.claude/settings.jsonsilently gothighinstead, because the plugin always passed--effort.Fix
Delete
DEFAULT_EFFORT_BY_MODEL/resolveDefaultEffortat the shared boundary, sobuildArgs()is the only place that emits the flag.--effortis forwarded only when the user passes it; otherwise Claude Code applies its own default.--modelstill defaults toopus— defaulting the model is a deliberate product decision, not a duplicated catalog.Net −91/+86 across 13 files. No new conditionals:
buildArgs()already gated onoptions.effort.Also fixed
Both
resolveModelandresolveEffortreturnundefinedfor whitespace-only input, and both were pushed into argv unconditionally.resolveDefaultEffortused to trim that away; removing it exposed--effort " "→ERR_INVALID_ARG_TYPEinspawn(). Both flags now gate on the resolved value. Regression test added.Docs
The first pass claimed "haiku rejects
--effort". Backed that out — a smoke test on CLI 2.1.220 showed--model haiku --effort highreturningis_error:false, so the CLI does not reject the combination; the effort-tier fact is an API-surface claim. Contracts now assert only what this plugin controls: no plugin-owned per-model default, effort support attributed to Claude Code.tests/skills-contracts.test.mjswas relaxed to match so CI does not pin an unverified claim.Migration
Users who relied on v1.2.0's
opus+xhighshould either pass--effort xhighexplicitly or seteffortLevelin their Claude Code settings — the latter now actually takes effect.Verification
npm run checkgreen: 506 unit / 43 integration / 22 E2E, 0 fail. Lint and typecheck clean.🤖 Generated with Claude Code