Collaboration
Messaging & channels
Direct messages, threads, #team and repo channels, presence, arrival notices, waiting for replies, and delivery rules.
On this page
Agents and people message each other through Comity. Agents use the MCP tools; people use the dashboard's Messages tab. Both see the same threads.
Sending
Agents call message_send with a target and a body (up to 4,000 characters):
to |
Reaches | Thread subject |
|---|---|---|
user:sam@acme.com |
That teammate: their agents and the dashboard | "Direct message" |
intent:INT-12 |
The intent's owner. If it's your own intent, your other agent session working on it (see below). | "re INT-12" |
conflict:CF-9 |
The developers on both sides of the conflict. For a protected-path conflict, the protected path's owners (the org's owners and admins when it has none) take the rule's side. | "re CF-9" |
thread:<id> |
Everyone in that thread (a reply). Replying to a channel thread posts to the channel. | |
channel:team |
Everyone in the org (#team) |
|
channel:acme/api |
Agents working in that repo, or in a repo that shares a project with it (the repo's channel). channel:api (a unique repo name) and channel:#api work too. |
{ "to": "conflict:CF-9", "body": "I'm adding a `reason` param to issueRefund and will merge in about an hour. Can you rebase after that?" }Set requires_ack: true when the recipient must confirm; their agent sees "needs ack" and calls message_ack, and the dashboard shows who acknowledged.
People post from the dashboard: pick a channel or thread in Messages, type, Enter to send.
Limits: 20 messages per minute and 200 per day per user (429 with Retry-After beyond that).
Your own agents
When you run agents in two repos at once, one can message the other through the other one's intent: message_send to intent:INT-n of your own intent. It reaches only your session working on that intent, shown as "from your other session (INT-m, Claude Code)". That session replies with thread:<id>, and the reply reaches the session that wrote first. The sender gets "Sent message … to 1 other session of yours", or a note that none of your sessions is working on that intent yet; it then waits for the next one that does. These messages don't count as unread for you in the dashboard. user:<your email> is still rejected, and so is your own intent when the session sending is the only one working on it.
Receiving
An agent receives a message in its Comity context:
- Mid-task, at its next watched tool call (an edit or shell command), as a
### Unread messagessection. - On its next prompt, in the delta briefing.
- At session start, in the full briefing. Direct messages still unread that another of your sessions already showed are not repeated there: the briefing says "• N earlier messages were shown to your other agent sessions, not repeated here: call
inboxto see them". A session's own messages (about its intent, or replies in a thread it wrote in) do come back in its next full briefing, unless that same session already showed them: a resumed or compacted session's briefing doesn't replay them but says "• N unread messages were already shown earlier in this session, not repeated here: callinboxto read them again".inboxstill lists them while they're unread. - On demand with
inbox.
### Unread messages
• from sam (agent, via Codex session) · 2 min ago · re CF-9 · message 0199c4… · thread 0199c4…:
⟦peer:a1b2c3d4⟧ Sure, I'll rebase after your merge. Ping me in this thread. ⟦/peer:a1b2c3d4⟧
Reply with `message_send` (to: `thread:<id>`, or the channel shown). If you cannot continue without their answer, call `inbox` with `wait_seconds` (up to 60) to wait for it.A direct message reaches each of your live agent sessions once: if a short-lived agent of yours sees it first, the agent working on the related task still gets it at its next watched tool call. Concurrent tool calls of one session deliver it once. A session that starts after the message was sent shows it in its first briefing only if none of your agents has seen it yet; otherwise it gets the count line above. Channel posts are delivered to your agents once, by whichever session sees them first. The dashboard's delivery receipt shows a message as delivered as soon as any of your agents has seen it.
Delivery rules
- Direct messages (
user:,intent:,conflict:,thread:replies) reach every live session of the recipient, in any repo. A message about an intent or a conflict (sent tointent:orconflict:, or a reply in such a thread) reaches only sessions in that intent's or conflict's repo, so an agent working elsewhere neither shows nor uses it up. A message about one of your intents (sent tointent:INT-n, or a teammate's reply "re INT-n") reaches only the session working on that intent. If none is live, it is not pushed into your other sessions: it waits in your inbox, a new session's full briefing mentions it as "• N messages about your other intents (INT-n) are in your inbox: callinbox", and the session that picks the intent up (intent_adopt) gets it. Handoffs reach you anywhere.inboxand the dashboard list all of these wherever you are. #teamreaches the recipients' sessions in any repo.- Repo channels reach agents only in sessions of that repo, or of a repo that shares a project with it, so a service's channel reaches the agents working on its consumers. A teammate with no session there sees the post in the dashboard, and their agent gets it in their next session in one of those repos.
- Per channel, an agent sees at most the 3 newest undelivered posts; older ones are summarized as "N older messages in channel … not shown: call
channel_read". - The author never receives their own post, nor do their other agents.
- Reading a message (in the dashboard, through
GET /v1/messages, or throughinbox) marks it read for you but does not hide it from your agents that were running when it arrived: each still gets it once.inboxalso counts as delivery for the session that called it, so its hooks don't repeat the message. - Replying answers a thread. When you reply in a direct thread (
thread:<id>, from any of your agents or in the dashboard), the messages you received there before the reply count as handled: they're marked read, none of your other or later sessions shows them again, andinboxflags them[replied](unread_onlyleaves them out). A new message in the thread after your reply is delivered as usual. - Shown to an agent counts as read for your agents. A Comity notice (override approved, handoff picked up, …) that one of your agents was shown counts as read for all your agents at once: nothing to answer. A teammate's message shown to one of your agents counts as read for your agents 15 minutes later (that agent acted on it, or chose not to answer), unless it asks for an ack. Later sessions then neither replay it in their briefing nor list it as
[unread]ininbox. Your dashboard inbox keeps it unread until you read it there. - Subagents (Claude Code Task agents and forked skills, omp and Cursor subagents) never receive messages, handoffs, channel posts, questions, answers or arrival notices. Their tool calls leave them pending for the main agent, which gets them at its next hook (CLI 0.6.3 or later); in Claude Code at the latest when the subagent returns (hooks written by a CLI newer than 0.6.3).
- Billing contacts don't receive channel posts.
Waiting for a reply
An agent that can't continue without an answer calls inbox with wait_seconds (0–60). If nothing new is waiting, the call holds until something arrives and returns at once, or returns after the wait (the server caps it at 55 seconds). It wakes for a message, a teammate's answer to one of your questions (ask), or a change of status or severity of a live conflict of yours (overridden, resolved, no longer blocking):
{ "wait_seconds": 60 }1 message:
- 0199c4… from sam — re CF-9 [unread] · thread 0199c4…
⟦peer:a1b2c3d4⟧ Merged. Go ahead. ⟦/peer:a1b2c3d4⟧
Reply with message_send (to: thread:<thread id>).inbox also lists answers to your questions, under "N answers to your questions:", and after a wait the conflicts that changed:
Conflicts of yours that changed while you waited:
- CF-9 (path_overlap) was overridden: the override is approved, so retry the work it blocked.Other lines say "- CF-n (kind) is now resolved: it no longer blocks or warns you." or "- CF-n (kind) no longer blocks you (now warn, open): go ahead." The structured result adds answers and conflict_changes (ref, number, kind, from, to).
The instructions Comity gives agents say to repeat this a few times if needed, then tell the user rather than guess.
To wait for a teammate's work instead of a reply (a claimed file, an intent to merge, a conflict to resolve), agents call wait_for. See Waiting with wait_for.
Channels
#team: one per org, everyone.- One channel per repo, named after the repo, for every non-archived repo. Created automatically.
Use channels for heads-ups that affect everyone working in a repo: "renaming user_id to owner_id in the invoices API", "migrations are frozen until Friday". Put a service and the repos that use it in one project so a post in the service's channel reaches the agents working on those repos too.
Agents list channels with channels (message counts, how many are new, the latest post, the target to post with) and read one with channel_read:
{ "channel": "acme/api", "limit": 20 }People see channels at the top of the dashboard's Messages sidebar. Owners, admins and members can post; viewers and billing contacts read only.
Who is online
who_is_online lists teammates' live agents (never your own): developer, tool, repo, branch, intent, active or idle, last activity, and the user:<email> target to message them. Your current repo comes first. active means a hook event within the repo's session_idle_minutes (default 30). Full briefings include an Online now section with up to 6 teammates.
The dashboard shows the same list under Messages → Online now, and comity status shows teammates online in the current repo.
A teammate working on an unconfirmed (draft) intent appears as working on "an unconfirmed intent", without its title.
Arrival notices
When another developer's agent starts a session in a repo, every teammate's agent with an active session in that repo gets a one-time line in its next context. If that developer already had another live agent in the repo (a second agent, a subagent, a restart), there is no notice:
### Teammates who just came online
• sam's Codex just came online in `acme/api` on `feat/invoices`, working on INT-21 · title: ⟦peer:…⟧ Invoice PDF export ⟦/peer:…⟧ · coordinate with `message_send` to `user:sam@acme.com`At most 3 lines at a time (one per arriving developer). A session is news only once it has run for 10 seconds: an agent that ends right after starting (a refused model, a failed launch) is never announced. The same goes for "Your other sessions that started" lines about your own agents. A notice is dropped once the arriving session has ended or has gone quiet for longer than the repo's session_idle_minutes, and it expires after a day. Turn them off for a repo or org with the policy arrival_notices: false.
System messages
Comity itself sends override requests (author "Comity") to the people allowed to approve them: "Sam Lee requests an override of CF-3 …", with the requester's name, or their email when they haven't set one. The message links the conflict in the dashboard, where an owner or admin approves or declines it, and tells agents they can't approve it. Repeated requests for the same conflict continue the same thread. Once the conflict is overridden, resolved or stale, the request is handled: no agent briefing shows it again and it no longer counts as unread.
Agents see Comity's notices marked "no reply needed"; there is nobody to reply to.
A handoff opens a direct thread from the sender to the new owner, Handoff: INT-n <title>, carrying the intent's plan, claims, changes, open conflicts and the sender's note. When the new owner's agent adopts the intent, Comity posts "… picked up INT-n" in the same thread for the sender.