feat: Sync Claude ACP adapter to v0.30.0 (SDK 0.2.112)#1748
Merged
charlesvien merged 5 commits intomainfrom Apr 21, 2026
Merged
feat: Sync Claude ACP adapter to v0.30.0 (SDK 0.2.112)#1748charlesvien merged 5 commits intomainfrom
charlesvien merged 5 commits intomainfrom
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Prompt To Fix All With AIThis is a comment left during a code review.
Path: packages/agent/src/adapters/claude/claude-agent.ts
Line: 595
Comment:
**Missing null-coalescing on `output_tokens` in `message_delta` handler**
Every other field in this block uses `?? lastStreamUsage.<field>` as a fallback, but `output_tokens` is assigned directly from `u.output_tokens`. If the SDK returns `null` here (the entire motivation for the null-safe guards in this PR), `lastStreamUsage.output_tokens` will silently become `null`, and `nextTotal` will be computed incorrectly since `null` coerces to `0` in JS arithmetic — dropping any previously accumulated output token count from the total.
```suggestion
output_tokens: u.output_tokens ?? lastStreamUsage.output_tokens,
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: packages/agent/src/adapters/claude/claude-agent.ts
Line: 1408-1411
Comment:
**Inconsistent `void` vs `await` for `applyFlagSettings`**
The first call to `applyFlagSettings` (when setting a new effort level) is `await`ed, but the reset path here and the `syncEffort` path (a few lines below) use `void` instead. If `applyFlagSettings` fails silently in the reset or sync paths, the SDK effort level state could diverge from `this.session.effort` without any observable error. Consider using `await` (or at minimum being intentional and adding a comment) for consistency.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Sync Claude ACP adapter to v0.30.0 (SDK ..." | Re-trigger Greptile |
7f338d1 to
65b74b6
Compare
jonathanlab
approved these changes
Apr 21, 2026
6192199 to
ff740e2
Compare
3687000 to
9b5f5ee
Compare
9b5f5ee to
96d7541
Compare
58b436e to
bb7a5ef
Compare
96d7541 to
79e0837
Compare
Member
Author
Merge activity
|
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
Adapter was pinned to v0.22.2 and missing several upstream fixes and features from the Claude ACP reference implementation.
Closes #1692
Changes
How did you test this?
Manually