feat(plugins): streaming output observer hooks — deltas, interim messages, lifecycle - #84924
Merged
Merged
Conversation
Salvage of PR #64317 (@deaneeth) onto current main, implementing #64161: observer-only on_stream_start / on_stream_delta / on_stream_end / on_interim_message plugin hooks dispatched through a host-owned bounded queue (one worker per callback) so plugin callbacks never run inline on the token path. Reasoning deltas are opt-in via plugins.stream_reasoning_deltas.
Contributor
૮ >ﻌ< ა ci reviewran on 868d5d1 — chore(attribution): map dnethusahan.h05@gmail.com -> deaneet
|
teknium1
added a commit
that referenced
this pull request
Aug 13, 2026
…rleaving The streaming-hook dispatcher runs one worker per callback; delivery order is FIFO per hook, never across hooks. Two tests pinned a global start->delta->delta->end interleaving that three concurrent workers don't guarantee, flaking CI twice within an hour of #84924 landing. Also wait for the full event count before shutdown so late deltas aren't dropped mid-assert.
This was referenced Aug 13, 2026
skappafrost
pushed a commit
to skappafrost/hermes-agent
that referenced
this pull request
Aug 15, 2026
…rleaving The streaming-hook dispatcher runs one worker per callback; delivery order is FIFO per hook, never across hooks. Two tests pinned a global start->delta->delta->end interleaving that three concurrent workers don't guarantee, flaking CI twice within an hour of NousResearch#84924 landing. Also wait for the full event count before shutdown so late deltas aren't dropped mid-assert.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…rleaving The streaming-hook dispatcher runs one worker per callback; delivery order is FIFO per hook, never across hooks. Two tests pinned a global start->delta->delta->end interleaving that three concurrent workers don't guarantee, flaking CI twice within an hour of NousResearch#84924 landing. Also wait for the full event count before shutdown so late deltas aren't dropped mid-assert.
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
Plugins can now watch streamed model output live —
on_stream_start/on_stream_delta/on_stream_end/on_interim_messageobserver hooks, delivered through a host-owned bounded queue so plugin callbacks never run inline on the token path (sub-issue #64161, tracker #64182). Salvages PR #64317 (@deaneeth) with authorship preserved.Changes
run_agent.py: stream lifecycle emitters (_stream_hook_base_payload/_emit_stream_start/_emit_stream_end), interim-message observation integrated with main's Codex interim-commentary extraction (fix(desktop, ink): don't wipe messages before final message #65919) and single-writer stream fencing ([Bug]: Retry can supersede a still-live SSE stream without aborting it — two streams interleave token-by-token into one transcript turn #65991)hermes_cli/plugins.py: 4 new VALID_HOOKS entries +iter_hook_callbacks, coexisting with the prompt-sections registryplugins.stream_reasoning_deltasValidation
Hyper's TTS-pipe ask from the original thread; observer-only v1 per ground rule 3.
Infographic