[FEATURE] Mods API: carry the sender's agent id and one delivery id on every agent message

Status Open
Reported on v2.1.296
Maintainer reply None cached
Activity 0 comments · opened Oct 11, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

High Command (github.com/dot-agi/high-command) is a mod that shows agent messages in one thread per sender. Claude Code 2.1.296, macOS.

A named subagent's SendMessage to the main conversation does not raise session.receive. It reaches prompt.submit with origin: { kind: 'peer' }, documented as "Another Claude session's message". That variant is only kind: 'peer';, with no sender field.

So the mod reads the sender from the <agent-message> frame text. A plugin can write or rewrite that frame. Names are not unique: AgentInfo.name says "Two agents may hold one name: id tells them apart."

The other hooks carry different ids, and nothing joins them:

  • SessionSendInput.agentId: "The id of the loop sending".
  • SessionReceiveInput.agentId: "The id of the loop the delivery is for".
  • SessionReceiveOrigin.plugin: "AS THE SENDER SAYS".
  • SessionSendResult returns isDelivered and no id.

Proposed Solution

  1. PromptOrigin { kind: 'peer' } from an agent of this session: add agentId?: string (the sender's AgentInfo.id), plugin?: string (as on SessionReceiveOrigin) and deliveryId: string. Engine-stamped and pinned.
  2. SessionReceiveOrigin peer and coordinator: add fromAgentId?: string and deliveryId: string.
  3. SessionSendResult { isDelivered: true }: return the same deliveryId.
  4. Cross-session peers: add a stable fromSessionId when the engine knows it.

Alternative Solutions

Send every subagent-to-main message through session.receive with these fields. The only join today matches session.send text to the next peer prompt. It fails for identical or rewritten texts.

Priority

Medium - Would be very helpful

Feature Category

Developer tools/SDK

Use Case Example

This closes three known limits in High Command's README:

  1. Two senders with one name share one row.
  2. A mod-written subagent message still gets the local sender label.
  3. A message between the main conversation and an agent can show twice, in the main inbox and in the agent's lane.

Additional Context

Generated types/claude-code/index.d.ts (2.1.296), lines 183, 8911, 11378, 11406, 11589, 11629.

Related, not the same: #94675, #89101, #97782, #92177.

View original on GitHub ↗