You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dd883e8
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(devin): carry reasoning signatures across turns (carry #6116) (#6184)
* fix(devin): carry reasoning signatures across turns
SWE-2 streams its #10 delta_signature and #21 delta_signature_type after
the visible answer, so the Responses layer stores them as a signature-only
reasoning item behind the thinking item. The replay mapping kept only
thinking blocks with text, so the signature never went back, and GPT and
Gemini rows, whose reasoning is signature-only, replayed nothing at all.
- Decode #21 with #10 and carry the type inside the stored signature.
- Replay one unsigned thinking block plus exactly one signature-only block
as a single signed prompt (#11, #12, #18), and replay signature-only
turns instead of dropping them. Existing rules stay: a signed block wins
over a stray signature-only block, and ambiguous mixes go unsigned.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit c483502)
* fix(devin): never replay a Claude signature, and pin the signature-only wire
Cognition streams Claude's thinking as a summary while the signature covers
the original, so replaying the pair fails validation. Live on
claude-opus-5-5 the next turn of a tool loop was refused with
invalid_argument in 5 of 6 signed replays and 0 of 3 text-only ones, and
dev already failed the same way intermittently (3 of 6) because it paired
a single signed block. An Anthropic signature is now dropped and the
thinking text replayed alone; a signature stored before its type was
recorded falls back to the model being called. Through the proxy the
failing tool loop then completed 6 of 6.
Tests now check the signature-only turn's wire (#12 and #18, no #11) and
that a signature-only turn with no text and no tool call is kept.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit e61c7c3)
* docs(structure): note the withheld Anthropic signature in Devin replay
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit e0b81e5)
* fix(devin): replay Claude signatures and retry a refused turn without them
Withholding every Anthropic signature stopped the invalid_argument
refusals but also stopped Claude recalling its earlier reasoning: in the
live benchmark claude-opus-5-5 matched 2 of 6 on dev and 0 of 6 with the
signature withheld. The signature is sent again, and a turn Cognition
refuses with invalid_argument before any output is retried once with the
Anthropic signatures withheld and the thinking text kept. Other signature
types and refusals after output are not retried.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit ecd9eaa)
* fix(devin): retry a refused Claude turn even after it streamed reasoning
Live, Cognition's refusal of a signed Claude replay usually arrives after
the model has streamed its reasoning, its signature and a finish frame,
and nothing visible. Only visible output (text or tool calls) now blocks
the retry, so those turns are retried without the signature instead of
failing. Through the proxy the stress case completed 10 of 10 (dev failed
3 of 6) and recalled the hidden number 7 of 10.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit bfc56f5)
* docs(structure): the Claude signature retry ignores reasoning-only output
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 073ef93)
* fix(devin): hold the signed attempt's reasoning until its outcome is known
The fallback yielded the signed attempt's reasoning and signature before
it knew whether Cognition would refuse the turn, so a successful unsigned
retry left the client holding the refused attempt's signature, which the
next turn would replay against the retry's thinking. When a fallback is
possible, the signed attempt's events are now held until its first
visible output or a clean finish, and discarded when the retry starts.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 796b07f)
* fix(devin): heartbeat while signed reasoning is held, and keep the refused attempt's usage
- While the signed attempt's events are held, a plain heartbeat goes out
at most every 15 seconds, so a long reasoning phase does not trip the
bridge's upstream stall deadline. The held reasoning and signature stay
held until the retry decision.
- The refused attempt was processed, so its final usage is added to every
usage frame of the unsigned retry (frames are cumulative per request)
instead of being dropped with its reasoning.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 37848f4)
* fix(devin): report the refused attempt's usage before the retry starts
The refused attempt's usage reached the turn only through the retry's
usage frames, so a retry that reported no usage, or failed before its
first frame, dropped those tokens again. It is now emitted before the
retry and still added to every later retry frame.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 78d62ed)
* fix(devin): pair late signatures only with adjacent reasoning
Co-authored-by: Sayo <[email protected]>
* fix(devin): heartbeat while signed reasoning waits for trailer
Co-authored-by: Sayo <[email protected]>
* fix(devin): bound held signed reasoning before streaming
Co-authored-by: Sayo <[email protected]>
* test(devin): retry signed refusal before history overflow classification
Co-authored-by: Sayo <[email protected]>
* docs(devin): explain reasoning continuity and fallback bounds
Co-authored-by: Sayo <[email protected]>
* fix(devin): include held signatures in payload bound
Co-authored-by: Sayo <[email protected]>
* docs(devin): keep adapter inventory table intact
Co-authored-by: Sayo <[email protected]>
* fix(devin): stop held heartbeat before release on error
Co-authored-by: Sayo <[email protected]>
* docs(structure): carry the model and wire rules into the restacked Devin row
Co-authored-by: Sayo <[email protected]>
* fix(devin): preserve signed refusal when retry budget is exhausted
Co-authored-by: Sayo <[email protected]>
* fix(devin): merge all held signature-attempt usage frames
Co-authored-by: Sayo <[email protected]>
---------
Co-authored-by: Sayo <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
0 commit comments