Skip to content

feat: Upgrade Claude adapter to SDK 0.3 with native binary#2385

Open
charlesvien wants to merge 4 commits into
mainfrom
05-26-upgrade_claude_adapter
Open

feat: Upgrade Claude adapter to SDK 0.3 with native binary#2385
charlesvien wants to merge 4 commits into
mainfrom
05-26-upgrade_claude_adapter

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented May 27, 2026

Problem

It's that time of the month again, claude adapter update! We pinned the adapter to SDK 0.2.112 for awhile because 0.2.114 broke session init; meanwhile upstream shipped Task tools, MCP changes and ACP 0.22. Lots of bug fixes + supposed session initialization timing improvements being adopted.

Changes

  1. Bump claude-agent-sdk 0.2.112 -> 0.3.144, ACP SDK 0.19 -> 0.22.1, anthropic SDK 0.89 -> 0.96
  2. Port TodoWrite -> Task tools migration with a per-session task map and TaskCreated/TaskCompleted hook handlers
  3. Switch session resume to the new resumeSession API (was unstable_resumeSession) for ACP 0.22
  4. Set MCP_CONNECTION_NONBLOCKING=0 so MCP servers stay blocking-connect and tools are ready on first prompt
  5. Ship native Claude binary in the bundle and harden vite packaging for cross-arch macOS/win/linux builds
  6. Add unit tests for hooks, models, settings, and task-state conversion

How did you test this?

Manually

Publish to changelog?

no

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@charlesvien charlesvien changed the title Upgrade claude adapter feat: Upgrade Claude adapter to SDK 0.3 with native binary May 27, 2026
@charlesvien charlesvien marked this pull request as ready for review May 27, 2026 02:28
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 27, 2026

T-Rex T-Rex Logs

What T-Rex did

  • Ran native Claude binary resolution across platform and architecture inputs, including Windows binary naming and Linux libc candidate ordering.
  • Ran TaskCreate and TaskUpdate plan-state conversion checks, including missing output, deleted tasks, ordering, and text-block parsing.
  • Checked task hook ordering and duplicate handling for TaskCreated and TaskCompleted events.
  • Ran MCP server parsing checks for http, sse, stdio, and unsupported sdk-type entries.
  • Checked model alias resolution, capability gating, and local-command marker stripping behavior.
Artifacts

Comprehensive proof-of-work results

  • Aggregates logs and results covering binary resolution, task state conversions, hook ordering, MCP config parsing, and model resolution checks to help verify the code-execution checks.

Task state conversion checks

  • Keeps the command output available without making the summary code-heavy.

Task hook ordering checks

  • Keeps the command output available without making the summary code-heavy.

MCP config parsing checks

  • Keeps the command output available without making the summary code-heavy.

Model resolution checks

  • Keeps the command output available without making the summary code-heavy.

Local command marker stripping checks

  • Keeps the command output available without making the summary code-heavy.

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "harden native claude binary packaging fo..." | Re-trigger Greptile

const filtered: SessionConfigSelectOption[] = [];
const seen = new Set<string>();

for (const entry of allowlist) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 applyAvailableModelsAllowlist was checked with a gateway default of claude-opus-4-7 and...

  • Bug
    • applyAvailableModelsAllowlist was checked with a gateway default of claude-opus-4-7 and availableModels: "claude-haiku-4-5".
    • The returned model options dropped the gateway Default option entirely.
    • The returned currentModelId changed to the first allowlisted model instead of preserving the default/current model.
    • This contradicts the function comment and Claude Code behavior that the Default model remains available even when availableModels is configured.
  • Cause
    • T-Rex reproduced this while running the changed behavior, but it did not return a separate root-cause sentence.
  • Fix
    • Update the changed code so this failing path is handled, then rerun the same T-Rex check to confirm it passes.
Artifacts

availableModels allowlist repro

  • Keeps the command output available without making the summary code-heavy.

Generated allowlist repro script

  • Contains supporting evidence from the run (text/javascript; charset=utf-8).

T-Rex Ran code and verified through T-Rex

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