Skip to content

chore(agent): sync claude adapter with upstream v0.54.1#3076

Open
charlesvien wants to merge 5 commits into
mainfrom
chore/sync-claude-adapter-v0.54.1
Open

chore(agent): sync claude adapter with upstream v0.54.1#3076
charlesvien wants to merge 5 commits into
mainfrom
chore/sync-claude-adapter-v0.54.1

Conversation

@charlesvien

@charlesvien charlesvien commented Jul 2, 2026

Copy link
Copy Markdown
Member

Problem

The claude adapter fork (packages/agent/src/adapters/claude) was last synced with upstream claude-agent-acp at v0.44.0. Upstream is now at v0.54.1 with a major ACP SDK release (1.1.0), a rearchitected prompt loop that fixes turns that never end while background tasks run, and a batch of streaming, permission and model fixes we want.

Closes #1919
Closes #2414

Changes

SDK bumps: @anthropic-ai/claude-agent-sdk 0.3.170 to 0.3.197, @agentclientprotocol/sdk 0.25.0 to 1.1.0, @anthropic-ai/sdk 0.104.1 to 0.109.0. The ACP major is source-compatible for us: the deprecated AgentSideConnection/ClientSideConnection classes still ship and still route the extMethod/extNotification surface our _posthog/* extensions use, so the agent() builder migration is recorded as an intentional divergence instead of ported.

Ported from upstream (details and commit refs in UPSTREAM.md):

Skipped with reasons logged in UPSTREAM.md: elicitation fixes, ACP logout, version flag, agent persona dropdown and the availableModels/1M-inference fixes that only apply to upstream's SDK-settings model pipeline.

Also adds fork-side regression tests (claude-agent.wake-up.test.ts) locking in the wake-up behavior: messages forward live after a settled turn, wake-up streaming dedupes, a task-notification result cannot settle the next queued turn and a normal turn runs after wake-up output.

How did you test this?

  • pnpm --filter agent typecheck and pnpm --filter agent build
  • pnpm typecheck (whole repo)
  • pnpm --filter agent test: 834 passed, including new unit tests for the content-based dedupe (tail forwarding, id-mismatch dedupe, residue clearing, empty-delta stalls), the consumer cancel paths (queued-turn settle, orphan accounting, force-cancel backstop) and Sonnet 5 model resolution
  • pnpm --filter code test: 179 passed
  • biome check --write on all changed files
  • Wake-up regression suite (4 tests) plus live repros of both issues against the real SDK on this branch: monitors not working #1919 (background sleep 10, turn ends with end_turn, "the test succeeded" streams in live 9s later) and handle ScheduleWakeUp tool call properly #2414 (ScheduleWakeup 60s out, turn ends, the wake-up turn streams in live when the timer fires), both with no follow-up prompt

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 8f12c5e.

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "sync claude adapter with upstream v0.54...." | Re-trigger Greptile

Comment thread packages/agent/src/adapters/claude/claude-agent.ts Outdated
Comment thread packages/agent/src/adapters/claude/session/models.test.ts
Comment thread packages/agent/src/adapters/claude/conversion/sdk-to-acp.test.ts
@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 2, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates denied this PR because it touches dependency toolchain files (pnpm-lock.yaml, package.json) and auth-related code, and exceeds the size ceiling for auto-review. Dependency and auth changes require human review.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jul 2, 2026
@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 2, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates denied this PR: it touches dependency toolchain files (pnpm-lock.yaml, package.json) and auth-related code, and exceeds the size ceiling for auto-review. These require human review.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jul 2, 2026
@charlesvien charlesvien requested a review from a team July 2, 2026 04:06

@jonathanlab jonathanlab left a comment

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.

amazing, great work!

Comment thread packages/agent/src/adapters/claude/claude-agent.ts
@charlesvien charlesvien force-pushed the chore/sync-claude-adapter-v0.54.1 branch from 0687915 to 7b376d0 Compare July 6, 2026 07:51

Copy link
Copy Markdown
Member Author

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.

handle ScheduleWakeUp tool call properly monitors not working

3 participants