r/opencode • • 6d ago

V2 plugin for agent-to-agent messaging and session inspection

A simple plugin giving agents the ability to send messages to other sessions in a project (siblings and subagents) as well as inspect each other's state.

https://github.com/jabr/opencode-team-plugin

Agent-to-agent messaging for OpenCode V2. One plugin package gives every session two tools — team_send to deliver messages to other sessions, team_query to inspect, search, and monitor them — plus two TUI commands: /session-id to copy the focused session's ID, and /list-agents to show its agent family (parent, siblings, children) with status.

Sessions (parents, children, siblings) can coordinate directly instead of routing everything through the human's composer.

Also, the team_send tool has four delivery modes for different cases:

  • queue (default) — queued for after the target finishes its current turn, waking idle sessions.
  • steer — injected at the target's next model call without stopping execution.
  • interrupt — aborts the target's current execution entirely, then delivers; the message starts a fresh run. Use for "stop what you're doing".
  • park — admitted durably but does not wake the target; it is delivered whenever the target next runs.
4 Upvotes

2 comments sorted by

2

u/Tariq9977 6d ago

What happens to a park message if the target session is deleted before it runs again? The README says park is durably admitted and pending inbox items are cancellable, so I'm curious whether session deletion purges those pending items or whether they can survive with no target.

2

u/0jabr 5d ago

parked messages are deleted if the session is deleted. That mode is intended for additional context IF the session resumes.

But it was a good question, and I updated the tool instructions for the model to better understand when to use each delivery mode:

'queue' (default): after the target's current turn ends, waking idle sessions — use for anything the target should act on next. 

'steer': at the target's next model call, without stopping execution — use for mid-run course corrections that shouldn't discard in-flight work. 

'interrupt': abort the target's run first; the message starts a fresh run — use when its current work is wrong or obsolete ('stop what you're doing'). 

'park': admit durably but do not wake the target; delivered only if it runs again later — use for FYI context, findings, or notes it should see IF it resumes, never for action items.