Skip to content

chore(upstream): adopt Claude Agent SDK 0.3.260 and abandoned-turn failure reasons (#9135) - #268

Open
rynfar wants to merge 2 commits into
pylonfrom
upstream/2026-09-04-lifecycle-reliability
Open

chore(upstream): adopt Claude Agent SDK 0.3.260 and abandoned-turn failure reasons (#9135)#268
rynfar wants to merge 2 commits into
pylonfrom
upstream/2026-09-04-lifecycle-reliability

Conversation

@rynfar

@rynfar rynfar commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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_reason values (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 the model_refusal_no_fallback notice.

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.md as a targeted batch; the reviewed-through cursor 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.aborted terminal 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

Model: Claude Fable 5.1. Harness: Pylon (Claude Code provider).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

t3dotgg and others added 2 commits September 4, 2026 11:52
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 560afffdea82000d757c98ea79678aee75f8648c)
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB +3 B (+0.0%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +4 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB −1 B (−0.0%) 7.8 KiB
Codex Live turn WebSocket decoded 56.5 KiB 56.5 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 8 8 0 (0.0%) 21
Claude Total thread wire 13.7 KiB 13.6 KiB −96 B (−0.7%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +5 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.7 KiB 6.6 KiB −101 B (−1.5%) 7.8 KiB
Claude Live turn WebSocket decoded 58.1 KiB 57.3 KiB −840 B (−1.4%) 66.4 KiB
Claude Live turn messages 8 8 0 (0.0%) 21

Baseline: f839aea · PR result: 25bb297 · Source CI: failure

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 111.2 KiB
  • Claude decoded thread snapshot: 111.9 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants