Skip to content

chore(deps): bump bundled @anthropic-ai/claude-code to 2.1.301 - #327

Merged
frenchie4111 merged 2 commits into
mainfrom
bump-claude-code-2-1-301
Oct 16, 2026
Merged

frenchie4111 merged 2 commits into
mainfrom
bump-claude-code-2-1-301

Conversation

@frenchie4111

Copy link
Copy Markdown
Collaborator

Bumps the bundled @anthropic-ai/claude-code pin from 2.1.285 → 2.1.301. This binary is used exclusively by Chat tabs (json-mode); Terminal tabs keep spawning the user's PATH claude, 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:

Do not call the AgentTool unless the user requested it
Do not use workflows or deep-research unless the user requested it

Newer versions soften this to honor project config and skills:

Do not use the ${Task} tool, workflows, or deep-research unless the user,
a CLAUDE.md file, or a skill asks for it

Verified in the 2.1.301 binary — 2 occurrences of the softened wording, 0 of the old hard-gated form:

$ strings -n 6 node_modules/@anthropic-ai/claude-code-darwin-arm64/claude \
    | grep -c 'a CLAUDE.md file, or a skill asks for it'
2

So Chat tabs now respect CLAUDE.md and 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.ts carries 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 the init event):

alias 2.1.285 2.1.301
opus claude-opus-5-5 unchanged
sonnet claude-sonnet-5-5 unchanged
haiku claude-haiku-4-5-20251001 claude-haiku-5-5
fable claude-fable-5-1 unchanged
best claude-fable-5-1 unchanged
opusplan claude-sonnet-5-5 unchanged

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 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:

prompt input output cache hit
≤ 100k tok $0.10/MTok $0.50/MTok $0.01
> 100k tok $0.50/MTok $2.50/MTok $0.05

RATES is keyed by model id alone and rateFor has 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 into rateFor, which is a larger change than this bump warrants. Cache reads are $0.01 against $0.10 input — exactly the existing 0.1 default cacheReadMult, so no override was needed.

Resolver / packaging — no changes needed

Checked the things that could drift with a bundled-binary bump:

  • bundledClaudeBinPath() in src/main/json-claude-manager.ts resolves <platform-pkg>/package.json then joins claude. That path exists in 2.1.301 (node_modules/@anthropic-ai/claude-code-darwin-arm64/claude, 250MB, executable) — version-agnostic, no edit.
  • asarUnpack globs match on package name, not version.
  • .github/workflows/{build-mac,release}.yml and scripts/pack-headless.mjs all read the version out of package.json at 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 — clean
  • npx electron-vite build — clean
  • npx vitest run — 135 files, 1833 tests, all passing

Lockfile churn is limited to the single dep and its eight platform subpackages.

Note on branch

The bump-bundled-claude-code branch was reused from already-merged PR #213 and sat 154 commits behind main, still pinning 2.1.220 — a PR from it would have reverted main and downgraded the pin. This branch is cut fresh from current main instead.

🤖 Generated with Claude Code

frenchie4111 and others added 2 commits October 16, 2026 16:19
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>
@frenchie4111
frenchie4111 merged commit 59eb88d into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant