fix(agent): surface silent partial-stream recovery (salvage #41498) - #53686
Closed
infinitycrew39 wants to merge 2 commits into
Closed
fix(agent): surface silent partial-stream recovery (salvage #41498)#53686infinitycrew39 wants to merge 2 commits into
infinitycrew39 wants to merge 2 commits into
Conversation
…d restart Salvage of NousResearch#41498 (0-CYBERDYNE-SYSTEMS-0). - Leave response_previewed false on partial_stream_recovery so gateway fallback delivery can send the recovered fragment plus explanation. - Always append the turn-completion explainer for partial_stream_recovery, not only for empty or very short fragments (NousResearch#34452 gap). - Launch the detached /restart helper before drain, idempotently, with a bounded wait of restart_drain_timeout + 5s.
Collaborator
Salvage of #41498 (rebased onto current |
Contributor
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.
Summary
Salvage of NousResearch/hermes-agent#41498 by @0-CYBERDYNE-SYSTEMS-0, rebased onto current
main(explainer logic moved toturn_finalizer.py).Fixes Hermes stopping mid-sentence when OAuth/Codex streaming dies after partial delivery — users previously saw a truncated reply with no explanation and had to manually type
continue.partial_stream_recovery: setresponse_previewed=Falseso gateway fallback delivery can send recovered text + explainer footer.turn_finalizer: always append turn-completion explainer forpartial_stream_recovery(not only ≤24-char fragments)./restart: launch helper before drain, idempotent, bounded byrestart_drain_timeout + 5s.Closes #41498.
Test plan
test_run_conversation_partial_stream_recovery_surfaces_explanationtest_partial_stream_recovery_on_empty_stub/test_partial_stream_recovery_preempts_prior_turn_fallback(updated assertions)test_request_restart_is_idempotent/test_detached_restart_helper_is_idempotent