chore(agent): sync claude adapter with upstream v0.54.1#3076
Open
charlesvien wants to merge 4 commits into
Open
chore(agent): sync claude adapter with upstream v0.54.1#3076charlesvien wants to merge 4 commits into
charlesvien wants to merge 4 commits into
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "sync claude adapter with upstream v0.54...." | Re-trigger Greptile |
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.
Problem
The claude adapter fork (
packages/agent/src/adapters/claude) was last synced with upstreamclaude-agent-acpat 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.Changes
SDK bumps:
@anthropic-ai/claude-agent-sdk0.3.170 to 0.3.197,@agentclientprotocol/sdk0.25.0 to 1.1.0,@anthropic-ai/sdk0.104.1 to 0.109.0. The ACP major is source-compatible for us: the deprecatedAgentSideConnection/ClientSideConnectionclasses still ship and still route theextMethod/extNotificationsurface our_posthog/*extensions use, so theagent()builder migration is recorded as an intentional divergence instead of ported.Ported from upstream (details and commit refs in
UPSTREAM.md):prompt()now enqueues aTurndeferred and a single long-lived consumer drains the SDK stream for the session's life. Turns settle at their terminalresultinstead of the trailingidle, between-turn and background output streams live, and a dead query stream rejects new prompts with a clear "session has ended" error. Adapted to the fork's single session, steer mode,interruptReason, broadcast timing, unsupported-slash-command gate andrefreshSession()(newqueryGenerationguard).tool_callbefore its permission request (Ripgrep missing in codex #820) via a sharedemittedToolCallsset; whichever of the stream and the permission flow runs second refines with atool_call_update.cancellationSignal(fix: o(n) requests on project switch + perisstance #801) so cancelling a turn dismisses the open dialog instead of leaving the await hanging.informationalsystem notices (fix: Fix auto-scroll race condition during agent streaming #777) so hook-blocked stops are visible.[1m]context hints no longer read as versions.session_info_update.applyFlagSettings({ fastMode }), intent retained across model switches and reconciled with SDK-reported state.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.How did you test this?
pnpm --filter agent typecheckandpnpm --filter agent buildpnpm 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 resolutionpnpm --filter code test: 179 passedbiome check --writeon all changed filesAutomatic notifications