← 提示词库 Meta/muse-code/skills/agents/references/session-protocol.md 原文 md
🌐 中英双语对照

The inbox path (TBH_AGENTS_SESSION_PROTOCOL) / 收件箱路径(TBH_AGENTS_SESSION_PROTOCOL)

ADR 41038 D1/D5. With the flag on when init runs, a project opens on the
inbox path and keeps it until archive (wake_path: inbox on every
context, init and resume line); the flag's later value changes nothing.
Flag off, or unset, is today's Monitor path byte for byte. On the inbox path
a thread's report is ALSO sent as a session message to your session — the
fast path, not the floor. Today's Monitor wake stays the wake floor on
both paths until #41228 lands: a worktree thread's message parks behind your
peer admission card and dies with the thread, so the message alone wakes
nobody.

ADR 41038 D1/D5。若 init 运行时该标志开启,项目将以收件箱路径打开并保持到归档为止(每条 context、init 和 resume 行上都标注 wake_path: inbox);此后标志值的变化不产生任何影响。标志关闭或未设置时,则与今天按字节一致的 Monitor 路径完全相同。在收件箱路径上,线程的报告还会作为会话消息额外发送到你的会话——这是快速路径,而非底线。在 #41228 落地之前,今天的 Monitor 唤醒在两条路径上仍是唤醒底线:worktree 线程的消息停在你的同级准入卡片之后并随线程一起消亡,因此仅凭消息无法唤醒任何人。

What changes for you / 对你的影响

What the helper does / 辅助器做什么

init resolves this session in the local session list (muse session-message list --json: exactly one row under this workspace label)
and records it as inbox_target; without one it opens the project on the
Monitor path and says why (inbox_wake_unavailable). The coordinator
session needs the runtime's local session messaging and external-agent
ingress gates on (MUSE_EXPERIMENTAL_LOCAL_SESSION_MESSAGING=on,
MUSE_EXPERIMENTAL_EXTERNAL_AGENT_INGRESS=on); threads inherit them through
host-manager. A thread's report files as today, then tries one
agents-message/v1 message from the thread's shell (muse session-message send --target <this session>, bounded to a few seconds); the follow
thread's inbox put --kind pr … :merged tries one too. Today's runtime
admits a session message only from the sending session's own model tool,
not from a shell's CLI (unverified_target_receipt,
causal_metadata_invalid; #41210), so the receipt hands the thread the
exact message.body and message.target (send_with_tool) and its brief
says to send it with its own send_session_message tool — a Muse thread
does; an engine without that tool reports by file alone and the Monitor
wakes you. A refused or held send is on the report line
(message.delivered: false), never retried as keystrokes; the file and the
event stand.

init 在本地会话列表(muse session-message list --json:在该工作区标签下恰好一行)中解析本会话,并将其记录为 inbox_target;若找不到,则项目以 Monitor 路径打开并说明原因(inbox_wake_unavailable)。协调者会话需要开启运行时的本地会话消息传递和外部代理入口开关(MUSE_EXPERIMENTAL_LOCAL_SESSION_MESSAGING=on、MUSE_EXPERIMENTAL_EXTERNAL_AGENT_INGRESS=on);线程通过 host-manager 继承这些开关。线程的 report 像今天一样归档,然后从线程的 shell 尝试发送一条 agents-message/v1 消息(muse session-message send --target <this session>,限制在几秒内);后续线程的 inbox put --kind pr … :merged 也会尝试发送一条。今天的运行时只接受来自发送会话自身模型工具的会话消息,而非来自 shell 的 CLI(unverified_target_receipt、causal_metadata_invalid;#41210),因此回执会把确切的 message.body 和 message.target(send_with_tool)交给线程,其任务简报要求用它自己的 send_session_message 工具发送——Muse 线程会照做;没有该工具的引擎仅通过文件报告,由 Monitor 唤醒你。被拒绝或被扣留的发送会体现在报告行上(message.delivered: false),绝不会以按键方式重试;文件与事件依然有效。