From 90aae00dfb28c2a352fbbb2f25452cb8b23b6db9 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Fri, 29 May 2026 14:26:58 -0700 Subject: [PATCH 1/2] Upgrade claude adapter --- packages/agent/package.json | 4 +- .../agent/src/adapters/claude/UPSTREAM.md | 10 ++- pnpm-lock.yaml | 88 +++++++++---------- 3 files changed, 54 insertions(+), 48 deletions(-) diff --git a/packages/agent/package.json b/packages/agent/package.json index 0230e1d742..858be1e41a 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -121,8 +121,8 @@ }, "dependencies": { "@agentclientprotocol/sdk": "0.22.1", - "@anthropic-ai/claude-agent-sdk": "0.3.154", - "@anthropic-ai/sdk": "0.100.0", + "@anthropic-ai/claude-agent-sdk": "0.3.156", + "@anthropic-ai/sdk": "0.100.1", "@hono/node-server": "^1.19.9", "@opentelemetry/api-logs": "^0.208.0", "@opentelemetry/exporter-logs-otlp-http": "^0.208.0", diff --git a/packages/agent/src/adapters/claude/UPSTREAM.md b/packages/agent/src/adapters/claude/UPSTREAM.md index 8d83fb5a8d..f7b8a10392 100644 --- a/packages/agent/src/adapters/claude/UPSTREAM.md +++ b/packages/agent/src/adapters/claude/UPSTREAM.md @@ -5,8 +5,8 @@ Fork of `@anthropic-ai/claude-agent-acp`. Upstream repo: https://github.com/anth ## Fork Point - **Forked**: v0.10.9, commit `5411e0f4`, Dec 2 2025 -- **Last sync**: v0.38.0 + #716, commit `61ebda2`, May 28 2026 -- **SDK**: `@anthropic-ai/claude-agent-sdk` 0.3.154, `@agentclientprotocol/sdk` 0.22.1, `@anthropic-ai/sdk` 0.100.0 +- **Last sync**: v0.39.0, commit `51a370e`, May 29 2026 +- **SDK**: `@anthropic-ai/claude-agent-sdk` 0.3.156, `@agentclientprotocol/sdk` 0.22.1, `@anthropic-ai/sdk` 0.100.1 ## File Mapping @@ -67,6 +67,12 @@ Fork of `@anthropic-ai/claude-agent-acp`. Upstream repo: https://github.com/anth - **Effort level sync** (v0.25.x): `xhigh` level added, `applyFlagSettings` on effort change - **Auto permission mode** (v0.25.0): Added to `CODE_EXECUTION_MODES`, available modes, ExitPlanMode options +## Changes Ported in v0.39.0 Sync + +- **SDK bumps**: claude-agent-sdk 0.3.154 -> 0.3.156, anthropic SDK 0.100.0 -> 0.100.1 (ACP SDK + unchanged at 0.22.1). The claude-agent-sdk bump pulls in the Claude Code v2.1.156 fix for Opus + 4.8 where thinking blocks could be modified, causing API errors mid-turn. + ## Changes Ported in v0.38.0 Sync - **SDK bumps**: claude-agent-sdk 0.3.144 -> 0.3.154, anthropic SDK 0.96.0 -> 0.100.0 (ACP SDK diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5562a48234..00c2c052cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -715,11 +715,11 @@ importers: specifier: 0.22.1 version: 0.22.1(zod@4.3.6) '@anthropic-ai/claude-agent-sdk': - specifier: 0.3.154 - version: 0.3.154(@anthropic-ai/sdk@0.100.0(zod@4.3.6))(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(zod@4.3.6) + specifier: 0.3.156 + version: 0.3.156(@anthropic-ai/sdk@0.100.1(zod@4.3.6))(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(zod@4.3.6) '@anthropic-ai/sdk': - specifier: 0.100.0 - version: 0.100.0(zod@4.3.6) + specifier: 0.100.1 + version: 0.100.1(zod@4.3.6) '@hono/node-server': specifier: ^1.19.9 version: 1.19.9(hono@4.11.7) @@ -926,60 +926,60 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.154': - resolution: {integrity: sha512-oFW3LD5lYrKAU+AKu27Z8hrzqkrh362qQrwi/i3DxGcud9BXUycsXYjShpDj3D3JZu169UzZuSPhx1Wajmbiwg==} + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.156': + resolution: {integrity: sha512-IkjcS9dqAUlD4Nb62L9AZtmAXCa+FV4ul8lIlyXXUprh3nlecbKsWOXVd/GORrzAhMmynJaX4+iV1JiutFKXUA==} cpu: [arm64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.154': - resolution: {integrity: sha512-5BgWEueP+cqoctWjZYhCbyltuaV/N2DmKDXD3/69cKaVmJp8XL9OCzlq/HEirA/+Ssjskx6hDUBaOcpuZ3iwQA==} + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.156': + resolution: {integrity: sha512-6PKi5fPmGRuzXu+Em/iwLmPG3mqg0hl92wcTU8fmChqyNtxhxsjCw7LTbdFqp/05o5NeZVVV4k3p7YUv5IFD6g==} cpu: [x64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.154': - resolution: {integrity: sha512-o2bCQN4Xn3UqCLErC5m4T7u0yYArJYmgFCUFnA6K96DdW2RERvx+gTKXxWuHEBkDO+eMoHLHLxk0u2jGES00Ng==} + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.156': + resolution: {integrity: sha512-R7KEVjxkR4rYgIQoHGBzwPdUJYxRTO8I4vHjRbMLH1eW4FS7BJvVs7ogfKR/NnHFBvMVqtC+l6jHLQv8bobUiw==} cpu: [arm64] os: [linux] libc: [musl] - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.154': - resolution: {integrity: sha512-rRkW4SBL3W7zQvKscCIfIGlmoeuTbMV6dXFbPdmpRGvmYZIs79RpzO6xrGBnnhmm+B7znQ9oHAnffi/2FBgJbA==} + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.156': + resolution: {integrity: sha512-H0Nfd41iw5isto9uQI1FlVSZ0eaDttr8rBpJMR25oK/mj3egMO5EmZ6aAxeeUYSLn2mSU50HA5VNxlGUE118TQ==} cpu: [arm64] os: [linux] libc: [glibc] - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.154': - resolution: {integrity: sha512-zA7S8Lm6O4QBsUpbhiOht8BgiXHOBBFUIo8ZLK6r5wAatK3Q44syWVxICeyCnR6wqfnkf3cugCw27ycS6vVgaA==} + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.156': + resolution: {integrity: sha512-/Q6WUizI6a+hqZZ6ElwRU0PEuFhOoN4v6CuU35HHbiZ/7uaocGht4A8ZIgK1Fw6wOGtZzGLbc00CA1OU1Zg8EA==} cpu: [x64] os: [linux] libc: [musl] - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.154': - resolution: {integrity: sha512-GpiFF8Ez6PbM3m0gqtCo/FKM346qyRdP7VhbmJzdnbNKTiiUZ66vDQyEUPZPCG24ZkrG4m96KpRIUwY08rHiNg==} + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.156': + resolution: {integrity: sha512-ymhrdlbWoYvTACUdaGdhrEv+ZMfwXLsf0BRLkr/IvY5aqybP7URzWmmZGOtDQpqkT/8xu/UCGqUYH3woJwUxfg==} cpu: [x64] os: [linux] libc: [glibc] - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.154': - resolution: {integrity: sha512-cDW1YFbU/PJFlrGXhlAGcbkXt80sEO6WtnH8nN8YHXLn5NWduy2q7o/qC6i8XozgvRGf6t/eMoH7IasGIEDhDw==} + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.156': + resolution: {integrity: sha512-5sAeNObQQrMy4NF9HwxewrMnU7mVxZDHh+/MfJVQSz0GSTvXQ6gOuRH8helMlfspoU6VOdekPxVLRooX/3foEw==} cpu: [arm64] os: [win32] - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.154': - resolution: {integrity: sha512-tSKaIIpL72OPg3WfzZTCIl8OJgcbq4qieu8/fDWjsdeQuari9gQMIuEflFphk9HqNsxpSmDqKi8Sm5mW2V566Q==} + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.156': + resolution: {integrity: sha512-/PofeTWoiKgnWNSNk0wG4SsRn22GGLmnLhg2R94WcNhCRFOyOTmiZcYH2DBlWZBIRVTZDsSfa/Pl1DyPvYCGKw==} cpu: [x64] os: [win32] - '@anthropic-ai/claude-agent-sdk@0.3.154': - resolution: {integrity: sha512-iEn25urI2QrMPFIhId3h7v/7EG5gsmF7ooe+6EvsAosePeLmpVVerp5nXtHnlmBkMinLecurcPA+OddKw76jYw==} + '@anthropic-ai/claude-agent-sdk@0.3.156': + resolution: {integrity: sha512-6nM/Dj+VMds52UXJ2YaV4IKhYamlUqN0HtdDrFzYz5lvPMpDS935qD8YZDAUpy+ltdoD6PJMd1V/CKFY3/oWCQ==} engines: {node: '>=18.0.0'} peerDependencies: '@anthropic-ai/sdk': '>=0.93.0' '@modelcontextprotocol/sdk': ^1.29.0 zod: ^4.0.0 - '@anthropic-ai/sdk@0.100.0': - resolution: {integrity: sha512-cAm3aXm6qAiHIvHxyIIGd6tVmsD2gDqlc2h0R20ijNUzGgVnIN822bit4mKbF6CkuV7qIrLQIPoAepHEpanrQQ==} + '@anthropic-ai/sdk@0.100.1': + resolution: {integrity: sha512-RANcEe7LpiLczkKGOwoXOTuFdPhuubS0i4xaAKOMpcqc55YO0mukgxppV7eygx3DXNjxWT6RYOLPyOy0aIAmwg==} hasBin: true peerDependencies: zod: ^3.25.0 || ^4.0.0 @@ -12344,46 +12344,46 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.154': + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.154': + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.154': + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.154': + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.154': + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.154': + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.154': + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.154': + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.156': optional: true - '@anthropic-ai/claude-agent-sdk@0.3.154(@anthropic-ai/sdk@0.100.0(zod@4.3.6))(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(zod@4.3.6)': + '@anthropic-ai/claude-agent-sdk@0.3.156(@anthropic-ai/sdk@0.100.1(zod@4.3.6))(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(zod@4.3.6)': dependencies: - '@anthropic-ai/sdk': 0.100.0(zod@4.3.6) + '@anthropic-ai/sdk': 0.100.1(zod@4.3.6) '@modelcontextprotocol/sdk': 1.29.0(zod@4.3.6) zod: 4.3.6 optionalDependencies: - '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.154 - '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.154 - '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.154 - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.154 - '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.154 - '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.154 - '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.154 - '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.154 + '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.156 + '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.156 + '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.156 + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.156 + '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.156 + '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.156 + '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.156 + '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.156 - '@anthropic-ai/sdk@0.100.0(zod@4.3.6)': + '@anthropic-ai/sdk@0.100.1(zod@4.3.6)': dependencies: json-schema-to-ts: 3.1.1 standardwebhooks: 1.0.0 @@ -20996,7 +20996,7 @@ snapshots: json-schema-to-ts@3.1.1: dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.29.2 ts-algebra: 2.0.0 json-schema-traverse@1.0.0: {} From 79d45839f96f1a9e5c26c5f16789e831ccdb8f2d Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Fri, 29 May 2026 14:53:47 -0700 Subject: [PATCH 2/2] explain Opus 4.8 thinking-blocks fix in UPSTREAM --- packages/agent/src/adapters/claude/UPSTREAM.md | 11 +++++++++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/agent/src/adapters/claude/UPSTREAM.md b/packages/agent/src/adapters/claude/UPSTREAM.md index f7b8a10392..46ab27ccc3 100644 --- a/packages/agent/src/adapters/claude/UPSTREAM.md +++ b/packages/agent/src/adapters/claude/UPSTREAM.md @@ -70,8 +70,15 @@ Fork of `@anthropic-ai/claude-agent-acp`. Upstream repo: https://github.com/anth ## Changes Ported in v0.39.0 Sync - **SDK bumps**: claude-agent-sdk 0.3.154 -> 0.3.156, anthropic SDK 0.100.0 -> 0.100.1 (ACP SDK - unchanged at 0.22.1). The claude-agent-sdk bump pulls in the Claude Code v2.1.156 fix for Opus - 4.8 where thinking blocks could be modified, causing API errors mid-turn. + unchanged at 0.22.1). v0.3.155 was not published to npm; the fix lives in 0.3.156. +- **Opus 4.8 thinking-blocks fix** (upstream v2.1.156): The SDK was modifying thinking blocks in a + way that produced the legacy `thinking: { type: "enabled", budget_tokens: N }` request shape, + which `claude-opus-4-8` rejects with HTTP 400 (`thinking.type.enabled is not supported for this + model. Use thinking.type.adaptive and output_config.effort`). 0.3.156 now emits + `thinking: { type: "adaptive" }` + `output_config: { effort }` for Opus 4.8 while keeping the + legacy shape for Opus 4.7 / Sonnet 4.6 where the API still accepts it. No in-repo code change + needed; `options.effort` in `session/options.ts` and `query.applyFlagSettings({ effortLevel })` + in `claude-agent.ts` keep their current call sites. ## Changes Ported in v0.38.0 Sync diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 00c2c052cb..7903846ae2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20094,7 +20094,7 @@ snapshots: fs-minipass@3.0.3: dependencies: - minipass: 7.1.2 + minipass: 7.1.3 fs-temp@1.2.1: dependencies: @@ -20241,7 +20241,7 @@ snapshots: foreground-child: 3.3.1 jackspeak: 3.4.3 minimatch: 9.0.5 - minipass: 7.1.2 + minipass: 7.1.3 package-json-from-dist: 1.0.1 path-scurry: 1.11.1 @@ -22098,7 +22098,7 @@ snapshots: minipass-collect@2.0.1: dependencies: - minipass: 7.1.2 + minipass: 7.1.3 minipass-fetch@2.1.2: dependencies: