Repository navigation
fix(clients): a server restart after a finished reply no longer hides that reply - #877
Merged
Merged
Conversation
… that reply When a server restart cancels background work that outlived a finished turn, recovery prompts the agent with a note in a new run linked to the finished one. Web and mobile merged every linked run into one response, so the note's reply became the response's final answer and the real answer folded away. Only a continuation of a run the restart cut short now joins that run's response. A continuation of a completed or waiting run starts its own response under the Server restarted note, the way a background wake does. Fork-Feature: server-restart-continuation-note Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Upstream divergenceBoth sides are compared with upstream at the in-order tip
Upstream files whose difference changes (7)
|
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.
When a server restart cancels background work that outlived a finished turn (for example a dev server the agent started), upstream's restart recovery prompts the agent with a note in a new run linked to the finished one through
restartContinuationOfRunId. The fork's restart-continuation folding merged every linked run into one response. The note's reply became the response's final answer, and the real answer was hidden in the "Worked for" fold.Only a continuation of a run the restart cut short now joins that run's response. A continuation of a completed or waiting run starts its own response under the "Server restarted" note, the same way a background wake starts one under its notification. The earlier answer stays visible as its own response's final message, and the note reply gets its own fold. This matches upstream, which already shows these continuations as a separate notice and response (pingdotgg#17723).
restartContinuationResumesResponsein client-runtime decides from the source run's status. Recovery only continues a completed or waiting source when its turn had settled, so these statuses identify that case.MessagesTimeline.logic.ts) and mobile (threadActivity.ts) stop following a link to a settled source when grouping responses, and treat that note as a response boundary.server-restart-continuation-noteledger invariant.Not changed: recovery still marks some settled waiting runs it cannot checkpoint as
cancelled. The client cannot tell those from a run cut mid-turn, so they still merge as before. The working timer also still carries the earlier run's work into the note's run, as upstream does for background wakes.Validation
threadActivitytest. I also didn't verify a live restart that cuts a response short; that path is unchanged, and its existing tests pass.Written by an agent (Claude Code, claude-opus-5-5).