feat(steer): peer + broadcast session steering (session.steer_peer / steer_broadcast) - #90288
Closed
HermesZum wants to merge 1 commit into
Closed
feat(steer): peer + broadcast session steering (session.steer_peer / steer_broadcast)#90288HermesZum wants to merge 1 commit into
HermesZum wants to merge 1 commit into
Conversation
Add peer-to-peer and broadcast steering on top of the existing steer machinery (prime-agent port). Reuses AIAgent.steer (appends to the target's last tool result) so the message-role invariant holds — no new user turn, no role alternation violation. - tools/delegate_tool.py: steer_session(session_id, text, resolve_agent=...) (peer; resolver injected so the module stays free of gateway internals, keeping it plugin-safe) and steer_broadcast(text, resolve_agent=..., exclude_session_id=...) which fans out to all live peer sessions + active delegated children. Child path reuses steer_subagent (unchanged). - tui_gateway/methods_session.py: session.steer_peer + session.steer_broadcast gateway methods; authority mirrors subagent steering via the invoking session's exact steer triple. - tests/tools/test_subagent_steer_f3.py: 8 hermetic tests (peer steer, unknown/no-resolver/empty safety, broadcast to peers+children, sender exclusion, noop) — all pass. Regression: 615 delegate/gateway steer tests pass.
4 tasks
Author
|
Superseded by #90340 — the complete F3 (user entry point: |
Author
|
Superseded by #90340 (complete F3). |
Author
This was referenced Aug 19, 2026
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
Adds peer-to-peer and broadcast steering between live sessions, on top of Hermes' existing
steer_subagentchild path and the genericAIAgent.steer(which appends to the last tool result and preserves the message-role invariant). Newsteer_session(peer) +steer_broadcast(peers + delegated children) intools/delegate_tool.py, exposed as gateway methodssession.steer_peer/session.steer_broadcast. Ports prime-agent'sagent_message.send/ peer-broadcast messaging by extending existing steering + delegation primitives — no architecture fork, no prompt-cache or message-role invariant break.Closes #90287.
Changes
tools/delegate_tool.py:steer_session(peer, resolver-injected, plugin-safe) +steer_broadcast(fans out to all live peer sessions + active delegated children). Child path reuses the existingsteer_subagentunchanged — no new steering race, no new shared state.tui_gateway/methods_session.py:session.steer_peer+session.steer_broadcastgateway methods; authority mirrors subagent steering via the invoking session's exact steer triple.tests/tools/test_subagent_steer_f3.py(new, 8 tests): peer steer, unknown/no-resolver/empty safety, broadcast to peers+children, sender exclusion, no-op.Design notes
AIAgent.steerfor the actual injection — appends to the target's last tool result, so no new user turn is created and the role-alternation invariant holds.steer_subagent(same lock +accepting_steergate), so there is no new race and no behavior change for child steering.Relationship to existing work (Step-0 duplicate search, see #90287)
list_agents/kill_agent, live control). This adds steering (inject a directive into a live session), which those do not provide. No duplication.steeror broadcast. Additive.Test plan
tests/tools/test_subagent_steer_f3.py: 8 tests (peer steer, unknown/no-resolver/empty safety, broadcast to peers+children, sender exclusion, no-op).delegate_tool.py+methods_session.pypy_compileclean.Invariants preserved
AIAgent.steer→ no new user turn, no role-alternation violation.steer_subagentlock + gate → no new race.Notes / asks