Repository navigation
Drop recoverable SSE error text when a remote turn's done event is ok - #352
Merged
Merged
Conversation
RemoteSseTurnConsumer accumulated SSE error events into the turn result even after done.ok=true (catalog skip of a stored agent, etc.). done is the terminal aggregate: success now clears the result error; failure still prefers done.error and falls back to prior error events. Co-authored-by: Tyler Reckart <tylerreckart@users.noreply.github.com>
This was referenced Sep 18, 2026
…-stale-error # Conflicts: # CHANGELOG.md
tylerreckart
marked this pull request as ready for review
September 21, 2026 12:58
tylerreckart
enabled auto-merge (squash)
September 21, 2026 12:58
…-stale-error # Conflicts: # CHANGELOG.md
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
RemoteSseTurnConsumeraccumulates SSEerrorevents intoerror_, thenfinish()copied that string even when the terminaldoneevent hadok: true.SSE
erroris documented as recoverable (the stream may continue). Production path: orchestrate emitserrorfor a stored-agent catalog skip (skipping stored agent …) and still finishes withdone.ok=true. The remote TUI (arbiter --connect) then returnedApiResponse.ok=truewith a leftovererror— the same leftover-error class as the 0.13.4 continuation-failure fix.Fix
doneis the terminal aggregate. Onok: true, clear accumulated error text. Onok: false, preferdone.errorwhen present and fall back to priorerrorevents when that field is empty.finish()does not copyerror_onto a successful result.Tests
unit_remote_connect— catalog-skiperrorthendone.ok=trueleaveserrorempty;done.ok=falsewithout an error field keeps the SSE message;done.errorstill wins over an earlier skip. Suite 25/25 locally (158 assertions), including ASan.arbitercompiles.Independently mergeable against
main(0456350). Code hunks (sse_turn.cpp/test_remote_connect.cpp) are disjoint from #321–#351. CHANGELOG[Unreleased]sibling-conflicts as usual after the first of those merges.Note
Low Risk
Narrow remote TUI SSE aggregation change with targeted unit tests; no auth, persistence, or API contract changes.
Overview
Fixes remote
--connectturns reporting success with a staleerrorstring when the SSE stream emitted recoverableerrorevents but finished withdoneok: true(e.g. skipping an invalid stored agent in the catalog).RemoteSseTurnConsumernow treatsdoneas authoritative: on success it clears accumulated SSE error text; on failure it still usesdone.errorwhen set and otherwise keeps earlier SSEerrormessages.finish()no longer copieserror_onto successful results.Unit tests in
test_remote_connect.cppcover catalog-skip-then-success, failure withoutdone.error, anddone.erroroverriding a prior SSE error. CHANGELOG[Unreleased]documents the fix.Reviewed by Cursor Bugbot for commit b2eda45. Bugbot is set up for automated code reviews on this repo. Configure here.