跳到正文
FunCoding

intercom

Coordinate live Atomic sessions and subagents through the Intercom extension: discover peers, send notifications, ask non-blocking questions, reply to pending asks, manage named groups, handle supervisor escalations, and run peer-to-peer swarms across one machine or multiple machines that share storage. Apply proactively whenever work spans multiple Atomic sessions, planner-worker splits, sibling subagent collaboration, constructive-quorum reviews, or cross-session handoffs.

Star
886
最近提交
2026年12月1日

packages/intercom/skills/intercom/SKILL.md

在 GitHub 上查看

Intercom

Coordinate directly between live Atomic sessions running on one machine, or across machines that share storage with multi-node routing on. This skill covers session-to-session delegation, named groups, peer-to-peer subagent swarms, and handling contact_supervisor escalations on the orchestrator side.

Actions at a glance

ActionBehaviorWhen to use
listList visible sessions sharing any group (full UUIDs, live status, names)Discover targets or find an idle peer
groupsList all available groups with counts and membership markersFind a group before joining
joinAdd or create a named group membership in place (additive)Join a shared coordination group
leaveLeave one named group, or reset to home group when omittedStop sharing a group
sendFire-and-forget message; accepts exact target, name glob, or subagents:*Notifications, task handoffs, broadcasts
askNon-blocking question to one exact target; inline reply if fast, else arrives laterWhen you need an answer without stalling
replyReply to the active or pending inbound ask (to or replyTo disambiguates)Answering an incoming ask or escalation
pendingList unresolved inbound asks and your own pending asksInspect waiting threads or get exact IDs
cancelCancel an outbound ask (askId) or close an inbound ask (replyTo)Stop waiting or close without replying
statusShow connection state, groups, and multi-node routing statusTroubleshooting connectivity

Addressing and delivery

  • Targets: live sessions accept an exact full session UUID, a unique 8-hex UUID prefix, or an exact case-insensitive name (set with /name <label>). Ambiguous prefixes require the full UUID.
  • Broadcasts (send only): name globs (worker-*, *) matching more than one session refuse delivery without broadcast: true and list the matches instead; subagents:* and subagents:<runId>/* broadcast without broadcast: true. Patterns never reach outside your groups. ask takes only one exact target.
  • Delivery urgency: choose delivery per send/ask: "steer" (default — arrives after current tool calls, never cancels work), "interrupt" (urgent correction or stop order — cancels the recipient's current model/tool call), or "followUp" (low priority — waits until the recipient finishes).
  • Attachments: include attachments: [{ type: "file" | "snippet" | "context", name, language?, content }] to share code or context cleanly.

Core patterns

1. Discover, send, ask, and reply

intercom({ action: "list" })
intercom({ action: "send", to: "worker", message: "Take src/api/client.ts retry logic. Ask if unclear." })
intercom({ action: "ask", to: "planner", message: "Exponential backoff or fixed intervals?" })
// Reply arrives inline within wait (default 10s), else later as "Reply to your ask <id> from planner".
// Keep working meanwhile; pass wait: { kind: "background" } to return immediately.

Reply naturally to inbound asks without reconstructing raw IDs:

intercom({ action: "reply", message: "Use exponential backoff starting at 100ms." })
// When multiple asks are open, inspect pending first and pass `to` or exact `replyTo` (8-hex prefix or full ID):
intercom({ action: "pending" })
intercom({ action: "reply", to: "planner", replyTo: "9f2c1e07", message: "Use 100ms base delay." })

Explicit to or replyTo fails closed on unknown, stale, colliding, or mismatched threads rather than replying to the wrong ask.

2. Named groups and cross-group return paths

Sessions share "default" by default (or project:<owner>/<repo> with multi-node routing on); "true" and "auto" are reserved. join is additive and later subagents inherit the most recently joined group:

intercom({ action: "join", group: "api-review" })
intercom({ action: "groups" })
intercom({ action: "leave", group: "api-review" }) // or omit group to return home

Ordinary send/ask requires a shared membership, with two exceptions: authorized contact_supervisor traffic, and answering a sender outside your groups whose message reached you. For that return path, reply directly to the sender's shown name or ID without joining a group — it allows up to 3 messages within 30 minutes of its latest message to you (reopening with a fresh count whenever it writes again; pattern sends and host-set reach policies never use it). Once exhausted, sends fail with <sender> is outside your intercom groups and its return path has closed.

3. Handle subagent escalations (orchestrator side)

When the subagent runtime supplies child bridge metadata, children escalate via contact_supervisor with three types:

TypeMeaningResponse
need_decisionBlocking question (10-minute timeout)Reply promptly via intercom({ action: "reply", message }).
interview_requestBlocking structured questionnaire (10-minute timeout)Reply with JSON { "responses": [{ "id": "...", "value": "..." }] } (omit info entries).
progress_updateNon-blocking milestone or discoveryRead; reply only if redirecting.

4. Peer-to-peer subagent swarms

Default to peer-to-peer coordination inside delegated batches: siblings launched in the same parallel set or named group share an Intercom group. The supervisor is not a message relay — siblings call intercom({ action: "list" }) and message each other directly to broadcast confirmed findings (to: "*", broadcast: true), hand off file paths/reproductions, claim shared files or expensive test suites, and challenge disagreements with evidence. Decide on evidence rather than deference, keep contact_supervisor strictly for supervisor decisions, and organize large runs into named team groups.

5. Constructive quorum (multi-reviewer convergence)

  1. Each reviewer inspects independently and records a preliminary verdict first.
  2. Run exactly one bounded evidence-exchange round in the shared group to share concrete evidence, challenge blockers, and correct objective misreadings (never a second round).
  3. Revise a verdict only on evidence, never deference; each reviewer returns its own final verdict noting any evidence-driven change for the orchestrator to tally.

Constraints and reliability

  • Terminal noninteractive children: completed, failed, interrupted, or cancelled subagents cannot answer ask, even if listed as idle. Use subagent({ action: "resume", id, message }) or a fresh child. Live interactive idle sessions remain askable.
  • Ask concurrency: ask never blocks or expires; up to maxPendingAsks (default 6) wait inline at once, and excess asks still deliver their replies as messages. A session cannot target itself, and only one blocking contact_supervisor wait runs per child ("Already waiting for a supervisor reply").
  • Confirmations: confirmSend: true prompts interactive sessions on new sends; replies (replyTo) skip confirmation.
  • Disconnect recovery: a single send, ask, or reply retries recoverable disconnects internally up to 3 times (1s, 2s, 5s) with the same message ID and within the 11-minute deadline (broker retains acceptance for 12 minutes; 1,000 client slots / 10,000 live delivery records / 64 MiB broker authority cap). Each new tool call is a new operation — if recovery ends with outcome: "unknown", do not automatically resend; check with the recipient first.
  • Troubleshooting: run intercom({ action: "status" }) to verify broker connectivity, group memberships, and multi-node storage routing; run intercom({ action: "pending" }) and intercom({ action: "cancel", askId | replyTo }) to inspect or close stale asks.

Bundled reference

  • references/peer-sessions.md — spawning visible peer Atomic sessions side-by-side via cmux or tmux/psmux, plus worked planner-worker, research-handoff, and pair-debugging examples. Read when launching a new visible peer session or reviewing full message templates.

相似的 Skill

ask-matt

MAmattpocock/skills336k近 7 天新增 4,217 个 star

chief-of-staff

MAmattpocock/skills336k近 7 天新增 4,217 个 star

setup-matt-pocock-skills

MAmattpocock/skills336k近 7 天新增 4,217 个 star

subagent-driven-development

OBobra/superpowers331k近 7 天新增 5,030 个 star

autonomous-loops

AFaffaan-m/ECC314k近 7 天新增 3,503 个 star

agent-eval

AFaffaan-m/ECC314k近 7 天新增 3,503 个 star