fix(claude-sdk-oauth): classify successful error results - #1223
Open
Altairpaca wants to merge 1 commit into
Open
fix(claude-sdk-oauth): classify successful error results#1223Altairpaca wants to merge 1 commit into
Altairpaca wants to merge 1 commit into
Conversation
Fixes code-yeongyu#1169 Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
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
Claude SDK terminal results may report
subtype: successwhileis_error: true; ambient streams then surface a successful assistant response and managed OAuth fallback is bypassed.Root cause
The result boundary classified success only by subtype and did not share one failure classifier across ambient, managed, and resident paths.
Invariant
Any SDK result with
is_error: truemust be terminal failure regardless of subtype. Ordinary success must remain successful, and rate-limit metadata must remain available to account failover.Changes
RED -> GREEN
RED: the injected
success+is_error: trueregression was emitted withstopReason: stop.GREEN: the regression and affected OAuth suites pass; 83 tests passed in the final focused wave.
Real-surface verification
The real SDK stream boundary is exercised through the repository SDK boundary override with a documented terminal-result payload; no credentials or network calls are used.
Regression coverage
Added
test/suite/regressions/1169-claude-sdk-oauth-result-error.test.tsand exact managed failover coverage for HTTP 429 plusblocking_limit.Risks / residuals
Provider-specific terminal prose remains classified by the existing failover policy. Full repository build typecheck is host-limited because this machine runs Node 22 while the repository requires Node 24 and exposes unrelated workspace export-resolution failures.
Non-goals
No changes to provider credentials, SDK versioning, retry budgets, or ordinary successful-result rendering.
Fixes #1169