Skip to content

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

Merged
frenchie4111 merged 2 commits into
mainfrom
bump-bundled-claude-code
Aug 3, 2026
Merged

frenchie4111 merged 2 commits into
mainfrom
bump-bundled-claude-code

Conversation

@frenchie4111

Copy link
Copy Markdown
Collaborator

Summary

  • Bumps the bundled @anthropic-ai/claude-code from 2.1.126 (2026-04-30) to 2.1.220 (2026-07-24, current npm latest) — ~3 months of upstream fixes.
  • Chat-mode-only impact. Bundled binary is spawned 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.
  • Exact pin preserved (no ^ / ~) — the pin is load-bearing so the --permission-prompt-tool round trip and stream-json schema can't drift between npm publishes.
  • Surgical diff: only package.json + package-lock.json. No changes to the resolver in src/main/json-claude-manager.ts — the createRequire lookup targets @anthropic-ai/claude-code-<platform>-<arch>'s claude executable, and the subpackage layout is unchanged between 126 and 220.

Verification

  • npm run typecheck — clean
  • npx electron-vite build — clean
  • npx vitest run — clean (one flaky git-ops-state.test.ts > rebase timeout under load; passes isolated, unrelated to this bump)
  • Bundled binary resolves + reports 2.1.220 (Claude Code)

Test plan

  • Open a worktree with a chat tab (json-mode)
  • Send a simple prompt requiring an LS tool call — verify streaming, tool render, and permission prompt appear
  • Approve the permission — verify the tool runs and result renders
  • Send a second tool-using prompt to catch late-stream regressions

🤖 Generated with Claude Code

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>
@frenchie4111 frenchie4111 added this to the v2.13.0 milestone Aug 3, 2026
@frenchie4111
frenchie4111 merged commit 80a5399 into main Aug 3, 2026
1 check passed
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>
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