[Feature] Sibling reply doctrine: top-level sessions should reply to agent-message senders #1529
stanleytejakusuma
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When one top-level session sends a message to another via
prime-agent send(oragent_message.sendwithreceiver_role="sibling"), the receiving session has no instruction to reply to the sender. The reply plumbing exists, but the doctrine does not, so cross-session questions stay one-way until someone manually follows up.Problem
The system prompt only gives the reply contract to CHILDREN: subagent sessions receive "when a task calls for an answer, reply explicitly with
await agent_message.send(message, receiver_role="parent")" (core/prompts/rlm.js). Top-level sessions get no equivalent. A root session receiving a daemon-delivered agent message sees a steering prompt that looks like a user message, answers it inside its own thread, and stops. Nothing tells it to reply to the sender.Live evidence from 2026-08-18: session A sent a steering message to session B asking a direct question (should Prime Agent keep a red-review subagent spec, or is it redundant?). Session B answered fully in its own transcript, but never sent anything back. The sender had to either screenshot session B's screen or read its JSONL transcript directly to get the answer. Same pattern repeated twice in one day. The message payload already carries the sender identity (
fromwith sessionId and sessionName, plusfromRelationship), so the receiving session has everything needed to reply, it just is never told to.Proposed fix (minimal, two parts)
DAEMON/PROMPT: add a sibling reply doctrine to the system prompt for top-level sessions, mirroring the child contract. One sentence in the base prompt or the agent-message guidance: "Agent messages from sibling sessions arrive as steering prompts carrying the sender identity in
from. When such a message asks a question or requests an answer, reply explicitly withawait agent_message.send(message, receiver_role="sibling", receiver_name="<sender session name>")." No new fields needed on the wire, the sender identity already travels with the message.SKILL/API: document the pattern in the agent-message skill so it is discoverable: a received-message section showing the sibling reply form, plus the rule that "not every message needs a reply" (mirroring the child contract) so sessions do not spam acknowledgments.
Optionally, for stronger structure: the daemon could add an explicit
replyTofield to the agent-message payload (sender session id and name, already derivable fromfrom) and the receiving session's prompt could reference it directly. The doctrine-only version is sufficient; the field is a convenience for agents that want to reply without parsing thefromshape.Expected behavior after the fix
prime-agent send A -> Bwith a question results in B replying to A via the sibling channel, agentically.Related
sendRemoteAgentSessionMessageretries with a freshDaemonClientper attempt, bypassing the supervisor command journal and duplicating steering prompts #821 (remote message delivery duplication) is delivery mechanics, closedAll reactions