Repository navigation
chore(deps): bump bundled @anthropic-ai/claude-code to 2.1.220 - #213
Merged
Merged
Conversation
Picks up ~3 months of upstream Claude Code fixes (2026-04-30 → 2026-07-24). Chat-mode-only impact: bundled binary is used exclusively by json-mode chat tabs (see CLAUDE.md's "dual-claude model" note). Terminal tabs continue to spawn PATH `claude` and are unaffected by this bump. Verified: typecheck / electron-vite build / vitest all clean. Chat mode smoke pending (highest-risk area is the `--permission-prompt-tool` round-trip and stream-json parser). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 of 9 tasks
frenchie4111
added a commit
that referenced
this pull request
Oct 16, 2026
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](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <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.
Summary
@anthropic-ai/claude-codefrom2.1.126(2026-04-30) to2.1.220(2026-07-24, current npm latest) — ~3 months of upstream fixes.claudeand are unaffected by this bump.^/~) — the pin is load-bearing so the--permission-prompt-toolround trip and stream-json schema can't drift between npm publishes.package.json+package-lock.json. No changes to the resolver insrc/main/json-claude-manager.ts— the createRequire lookup targets@anthropic-ai/claude-code-<platform>-<arch>'sclaudeexecutable, and the subpackage layout is unchanged between 126 and 220.Verification
npm run typecheck— cleannpx electron-vite build— cleannpx vitest run— clean (one flakygit-ops-state.test.ts > rebasetimeout under load; passes isolated, unrelated to this bump)2.1.220 (Claude Code)Test plan
🤖 Generated with Claude Code