Repository navigation
Conversation
…ingdotgg#39765) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#39733) Co-authored-by: Julius Marminge <julius0216@outlook.com>
smirea
force-pushed
the
fix/edit-resend-handoff
branch
from
November 20, 2026 15:43
69a0be4 to
c2ef008
Compare
…from a model to itself Co-Authored-By: stefan <steven.mirea@gmail.com>
smirea
force-pushed
the
fix/edit-resend-handoff
branch
from
November 20, 2026 15:56
c2ef008 to
7e3ae9c
Compare
Owner
Author
Owner
Author
|
Moved upstream: pingdotgg#39791 |
Owner
Author
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
Editing the last message and resending it on an ACP agent (Antigravity, Grok, Kiro, the dev replay agent) draws a timeline divider that reads "Context handoff · 4 Neon → 4 Neon": a handoff from a model to itself. Nothing was switched. The agent cannot rewind its own conversation, so T3 Code started a fresh session of the same conversation and sent it the kept history (
docs/user/providers-antigravity.md). The same divider appears whenever a native resume fails.The server already records what happened: the turn item is titled "Recovered context" and its source and target are the same provider conversation. Web and mobile ignore both and draw every handoff item as
<from> → <to>. pingdotgg#28178 asked for the thread to show "that the provider conversation couldn't be resumed and a new one was started"; a model handing off to itself does not say that, and since pingdotgg#30188 it shows on every Edit from here on these agents.Steps, on the dev replay agent:
Change
isRecoveryHandoffinpackages/client-runtimereports a handoff item whose source conversations are all its own target conversation. Only the resume fallback writes one. For such an item:resolveHandoffEndpointsreturns no source, so both clients drop the<from> →half and keep the target.The check is the conversation's identity, not the model. A fork, a merge-back, or a provider switch between two conversations on one model is still a handoff and looks as it did.
Scope
Fixes #ISSUE
Routes to the row: Edit from here then resend, and a failed native resume, on web, desktop (same web client) and mobile. All go through the one shared check. Left alone: the pending-handoff footer, and handoffs between two conversations (provider switch, fork, merge-back, imported context).
pingdotgg#39437 targets the same divider. It decides by "same provider and model on both sides", which also relabels a fork and a merge-back between two conversations on one model as "Context restored" (captures below), and it adds no test.
Verification
Re-runnable on a Linux VM with no account (replay agent, headless Chromium):
packages/client-runtime/src/handoff.test.ts› "treats a provider conversation restarted in a fresh session of itself as a recovery": fails onmain(isRecoveryHandoff is not a function), passes here. It also asserts that a same-model handoff between two conversations keeps its source.vp run scenarios:provewith the scenario below, basemain563ba1af19, headafabd029e3: fails on base, passes on head. With onlyV2LifecycleRow.tsxreverted the scenario fails again.563ba1af19)afabd029e3)cfa7e8c266) fails: both read "Context restored".vp run check:changedandvp run i18n:checkpass.Needs more than the VM:
v0.1.12-nightly.20261120.4994): editing and resending the last message drew "Context handoff · 4 Neon → 4 Neon", and the server loggedRecovering provider context in a fresh native sessionwith reasonnative_session_lacks_kept_turns.Scenario: edit and resend
Scenario: fork and merge-back on one model
Claude Fable 5.2 in Claude Code (T3 Code).