feat(agent): Sync Claude ACP adapter with upstream v0.42.0#2513
Open
charlesvien wants to merge 4 commits into
Open
feat(agent): Sync Claude ACP adapter with upstream v0.42.0#2513charlesvien wants to merge 4 commits into
charlesvien wants to merge 4 commits into
Conversation
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jun 6, 2026
Contributor
What T-Rex did
ArtifactsVerbose output from 29 generated targeted tests
Existing model test suite output
Generated SDK-to-ACP conversion tests
Verbose output from 29 T-Rex-generated tests
Existing model test suites pass with no regressions
Prompt To Fix All With AIFix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
packages/agent/src/adapters/claude/claude-agent.ts:1050-1074
**Use ACP session id**
These new updates are sent with `message.session_id`, but the client routes ACP notifications by the active ACP session id. In this adapter those ids can differ because the adapter creates its own ACP session id and the SDK message carries the Claude SDK session id. When a long-running tool emits progress, the update can be sent to a session the client is not rendering, so the visible tool call keeps looking stalled. The same applies to the rate-limit update.
### Issue 2 of 3
packages/agent/src/adapters/claude/conversion/sdk-to-acp.ts:795-797
**Route denial updates correctly**
This sends the permission-denied tool update to the SDK session id instead of the ACP session id from `context`. The original tool call is emitted under the ACP session, so when a permission rule denies the tool, the failure update can be dropped or routed elsewhere. The user then sees a tool call that never resolves instead of the permission-denied message.
### Issue 3 of 3
packages/agent/src/adapters/claude/claude-agent.ts:626-634
**Refresh skills baseline**
This mid-session command update refreshes the visible command list, but it skips the same skills-token baseline update done by `sendAvailableCommandsUpdate`. When skills or plugin commands are discovered during a session, the command list changes while the context breakdown keeps the old skills estimate. Later usage breakdown notifications can show stale skills context even though the session has the new commands.
Reviews (1): Last reviewed commit: "update claude adapter with upstream" | Re-trigger Greptile |
8c6bc8d to
fec00b8
Compare
c7bf83f to
c505ae8
Compare
fec00b8 to
a51aca3
Compare
c505ae8 to
978596d
Compare
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
a51aca3 to
da4b88a
Compare
978596d to
f71d76f
Compare
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
Our fork of @anthropic-ai/claude-agent-acp lagged upstream by three releases (v0.39→v0.42), missing SDK fixes (Opus refusal handling, wedged-cancel hangs) and a breaking ACP SDK model-API removal.
Changes
How did you test this?
Manually
Automatic notifications