Repository navigation
feat(agent): message another agent's orchestrator through the daemon - #1942
Merged
Merged
Conversation
An orchestrator's Agent(to: "<agent>") used to bounce unless the name was one of its own subagents or its lead. Now an agent with no lead can message another Markdown agent by name. The daemon starts that agent in a top-level session of its own, the way a chat opened as that agent runs, on its workspace when it has one, with [Message from <sender>] as its first turn. The sender follows it like a teammate: its turns and replies come back, and the next message continues the same session. Its approvals stay open for whoever opens its chat instead of being cancelled. Every session now records how it started. The conversation metadata embeds an Origin value object with the agent it runs as, the label its orchestrator gave it and the session whose message started it (sent_by), next to parent_session_id and invoked_by. Thread options carry the origin across teleports, and conversations list and show emit it.
edenreich
marked this pull request as ready for review
November 23, 2026 00:53
This was referenced Nov 23, 2026
Open
Contributor
Author
|
Rooms build on this: room member sessions reuse the session origin added here (it gains |
Contributor
|
🎉 This PR is included in version 0.267.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
An orchestrator could only message its own subagents or its lead, so
Agent(to: "tester")from a chat opened asresearcherbounced with "you have no lead and no subagents to message". The model then spawned a generic subagent labelled "tester" instead. The desktop listed it under the researcher's chat, and the tester agent itself never saw the message.Now an agent with no lead can message another Markdown agent by name. The daemon starts that agent in a top-level session of its own, and every session records how it started, so clients can show the agent, the label and the sender.
Changes
internal/tools/agent_message.go) - whentonames no teammate and the caller has no lead, a Markdown agent of that name starts as a peer:agent: <name>and resolved the way a chat opened as that agent is, with a plain session id and nosubagentspawn. It is placed on the agent'sworkspacewhen the agent has one.[Message from <sender>]with the text.Agent(to: "<sender>")replies come back to the sender. The sender's next message continues the same session.convdomain.Originholdsparent_session_id,invoked_by,agent,labelandsent_by, and is embedded in the conversation metadata and summary.infer conversations listandshow --format jsonemit it.INFER_SESSION_AGENT,INFER_SESSION_LABELandINFER_SENT_BY.ThreadOptions.Origincarries it across teleports.ResolveThreadAgentrecords the resolved agent, so a chat opened as an agent lists itsagenttoo.INFER_SENT_BYreports its turns and gets a team channel the way a subagent does.Agent.yamldescription and its tool-definitions golden,docs/subagents.md(Messaging Another Agent), andinternal/sessions/README.md.Portable, and resolver recording.Impact
inference-gateway/desktopreadsagent,labelandsent_byfrom the listing in a follow-up pull request, once this is released and.cli-versionmoves to it.Docs ticket draft for
inference-gateway/docs: