Repository navigation
chore(deps): bump bundled @anthropic-ai/claude-code to 2.1.301 - #327
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2.1.301 changed what the bundled CLI resolves the `haiku` alias to: claude-haiku-4-5-20251001 → claude-haiku-5-5. Re-derived from the new binary's `init` event per the procedure in agent-registry.test.ts. claude-haiku-5-5 had no entry in pricing.ts, and rateFor's prefix fallback has no claude-haiku-5 key to catch it, so priceFor returned 0 — every Chat tab session on `haiku` would have billed $0 silently. The "resolves only to models pricing.ts can bill" test catches exactly this. Haiku 5.5 is the only model priced by prompt length ($0.10/$0.50 up to 100k prompt tokens, $0.50/$2.50 above it). RATES is keyed by model id alone with no access to a request's token count, so only the base tier is carried; long-context Haiku sessions under-report rather than over-report. Noted in a comment at the callsite. Cache reads are $0.01/MTok against $0.10 input — exactly the 0.1 default cacheReadMult, so no override is needed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Bumps the bundled
@anthropic-ai/claude-codepin from 2.1.285 → 2.1.301. This binary is used exclusively by Chat tabs (json-mode); Terminal tabs keep spawning the user's PATHclaude, so they're unaffected. See the "Dual-claude model" note in CLAUDE.md.Motivation: the delegation prompt
Older bundled binaries hardcoded an Opus-5-only prompt line that gated delegation on the user alone:
Newer versions soften this to honor project config and skills:
Verified in the 2.1.301 binary — 2 occurrences of the softened wording, 0 of the old hard-gated form:
So Chat tabs now respect
CLAUDE.mdand skills when deciding to delegate.Second commit: Haiku 5.5 pricing
Not cosmetic — the bump changes billing behavior and would otherwise ship a silent bug.
agent-registry.test.tscarries alias-resolution data explicitly marked "re-derive after bumping the pin." Re-deriving against 2.1.301 via the documented procedure (claude --model <alias> -p x --output-format stream-json --verbose, reading theinitevent):opusclaude-opus-5-5sonnetclaude-sonnet-5-5haikuclaude-haiku-4-5-20251001claude-haiku-5-5fableclaude-fable-5-1bestclaude-fable-5-1opusplanclaude-sonnet-5-5claude-haiku-5-5had no entry inpricing.ts, andrateFor's prefix fallback has noclaude-haiku-5key to catch it — sopriceForreturned 0. Every Chat tab session onhaikuwould have billed $0 silently. The existing "resolves only to models pricing.ts can bill" test is designed to catch precisely this, and did.The offered alias list itself (
BUNDLED_CLI_ALIASES) is byte-identical between the two versions, so no picker changes.Known limitation
Haiku 5.5 is the only model priced by prompt length:
RATESis keyed by model id alone andrateForhas no access to a request's token count, so only the base tier is carried. Long-context Haiku sessions under-report cost rather than over-report. Flagged in a comment at the callsite; expressing the tier properly would mean threading token counts intorateFor, which is a larger change than this bump warrants. Cache reads are $0.01 against $0.10 input — exactly the existing0.1defaultcacheReadMult, so no override was needed.Resolver / packaging — no changes needed
Checked the things that could drift with a bundled-binary bump:
bundledClaudeBinPath()insrc/main/json-claude-manager.tsresolves<platform-pkg>/package.jsonthen joinsclaude. That path exists in 2.1.301 (node_modules/@anthropic-ai/claude-code-darwin-arm64/claude, 250MB, executable) — version-agnostic, no edit.asarUnpackglobs match on package name, not version..github/workflows/{build-mac,release}.ymlandscripts/pack-headless.mjsall read the version out ofpackage.jsonat build time rather than hardcoding it.Verification
node_modules/@anthropic-ai/claude-code/package.json→ 2.1.301; platform subpackage → 2.1.301;claude --version→2.1.301 (Claude Code)npm run typecheck— cleannpx electron-vite build— cleannpx vitest run— 135 files, 1833 tests, all passingLockfile churn is limited to the single dep and its eight platform subpackages.
Note on branch
The
bump-bundled-claude-codebranch was reused from already-merged PR #213 and sat 154 commits behindmain, still pinning 2.1.220 — a PR from it would have revertedmainand downgraded the pin. This branch is cut fresh from currentmaininstead.🤖 Generated with Claude Code