fix(claude): recover failed turns and show native limit notices - #6
Draft
q1 wants to merge 2 commits into
Draft
Conversation
Restart idle Claude runtimes with a recorded turn failure on the next explicit turn while retaining the resume cursor and model options. Cover unchanged retries and the native terminal 429 result shape. Fork-Feature: base Upstream: candidate
Keep runtime warnings visible in loaded history and live transcript updates. Render the provider message instead of only the generic runtime error summary. Fork-Feature: swift-ios Upstream: no
q1
force-pushed
the
sync/20260906T212712Z
branch
from
September 6, 2026 22:09
0b4924a to
db595e1
Compare
q1
force-pushed
the
fix/claude-failed-turn-recovery
branch
from
September 6, 2026 22:09
caa718e to
fcd986d
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.
After a Claude usage-limit failure, unchanged Continue messages can keep failing even after the account is changed externally and new threads work. Changing only effort appears to fix the model, but actually causes T3 to restart the Claude SDK query and resume the same conversation.
The server now resumes an idle Claude session with a recorded turn failure in a fresh runtime on the next explicit turn. It preserves the conversation cursor, provider instance, workspace, runtime mode, model, and options. It does not automatically resend work, change models, or restart a healthy session or an active turn. The SwiftUI client now renders runtime warnings and the actual
payload.messagefor errors across initial history, pagination, and live updates.Evidence and scope:
subtype: success,is_error: true,terminal_reason: api_error, andapi_error_status: 429. The adapter correctly failed the turns but left the processreadywithlastError, and the reactor reused it.thread.turn.startcommands, omittingmodelSelectionon unchanged retries. It was not replaying a prior error. Its transcript mapper droppedruntime.warningand ignoredpayload.message, explaining the missing initial limit notice and generic Runtime error rows.Validation:
build-for-testingpassed, including four new runtime-notice tests. The Swift tests were compiled, not executed; no Simulator UI was launched or screenshot verification performed, as requested by the maintainer.Review structure:
sync/20260906T212712Z; review the prerequisite sync separately.Upstream: candidate); the second is SwiftUI-only. The server commit applies cleanly to upstreamea646c083and was tested there. Nothing was submitted upstream.Model: GPT-6. Harness: Codex.