chore(upstream): adopt Claude Agent SDK 0.3.260 and abandoned-turn failure reasons (#9135) - #268
Open
rynfar wants to merge 2 commits into
Open
chore(upstream): adopt Claude Agent SDK 0.3.260 and abandoned-turn failure reasons (#9135)#268rynfar wants to merge 2 commits into
rynfar wants to merge 2 commits into
Conversation
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 560afffdea82000d757c98ea79678aee75f8648c)
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
What this adopts
Upstream
#9135(560afffdea), cherry-picked with-x: Claude Agent SDK 0.3.170 → 0.3.260, plus failure classification for results the CLI gives up on.terminal_reasonvalues (api_error,budget_exhausted,prompt_too_long,model_error, and the rest) and 529 overloads now mark the turn failed with a user-facing reason instead of a success-shaped result with an empty error list. It also handles three new system subtypes (control_request_progress,worker_shutting_down,informational) and themodel_refusal_no_fallbacknotice.This is the reliability half that upstream had and Pylon did not: after #264–#267, a turn can no longer vanish silently, and with this a turn the CLI abandons no longer looks like a clean finish either.
Review context
Targeted upstream review, scoped to the paths involved in the 2026-09-04 lost-message incident. Recorded in
.agents/upstream-review.mdas a targeted batch; thereviewed-throughcursor is deliberately not advanced. The review confirmed upstream has no fix for the incident itself (its adapter and synthetic-turn code are identical, and it has no strict admission gate), and identified two further candidates that are not standalone and are left pending in the ledger:#9653(OpenCode approvals and stop,turn.abortedterminal mapping) sits on four OpenCode commits Pylon has not taken. Adopt as a series in the next OpenCode batch.#9167(continue active threads across server self-updates) rewrites startup reconciliation Pylon reworked for Prime. Manual port.Verification
vp iresolved the new SDK.vp test runonClaudeAdapter.test.ts: 88 passed (85 existing including fix(claude): between-turn status and resume handshake no longer touch the turn lifecycle #265's two, plus upstream's three).vp run -F t3 typecheck: clean.vp fmt --checkandvp linton the adapter files and the ledger: clean.Model: Claude Fable 5.1. Harness: Pylon (Claude Code provider).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.