alex-pezarro-portswigger/aw-session-registry/tree/main/skills/peer-messages
peer-messages
# aw-session-registry 一个 [Agent Wrangler](https://github.com/alex-pezarro-portswigger/agent-wrangler) 扩展,让在**同一仓库**中工作的会话互相告知正在做什么,并彼此发送消息。
关于这个 mod
每个会话都会向会话注册表发布自己的句柄和正在进行的工作,代理则会获得这些 MCP 工具:
list_repo_sessions— 查看仓库中还有谁在工作update_session_note— 告诉协作者本会话正在做什么list_remote_peer_sessions/send_remote_peer_message— 向其他工作区中的会话发消息。自己工作区中的会话使用 Agent Wrangler 内置的send_message,远程工具会拒绝向它们发送。
每 15 秒检查一次收到的远程消息,并且在代理看到消息前等待你批准:
- **Claude 会话:**随附的
peer-messagesMod(skills/peer-messages/,一个由函数钩子组成的 Claude Code 插件)负责卡片的收件箱。每条消息会显示在提示列上方,并提供 Accept、Accept all、Dismiss 和 Dismiss all(用 ctrl+x tab 聚焦该区域,然后按a、l、d或x)。两个「all」选项会在本次 Claude 会话剩余期间,回答来自该发送方会话的每条消息,无论消息已经排队还是之后才到达。/peer-list和/peer-send <n|handle> <message>用于列出同一仓库中的在线会话并向它们发消息。扩展程序会在启动时(PEER_MESSAGES_INBOX=mod)把收件箱交给 Mod,因此在本扩展更新前启动的 Claude 卡片没有 Mod,它的消息会留在注册表中(最长保留 6 小时),直到卡片恢复。需要使用能加载 Mods 的 Claude Code 版本。 - **Codex 会话:**消息会停留在卡片上,并提供 Allow once、Allow all from this session、Deny 和 Block。
随附的钩子会在第一次提示时向代理简要说明协作者正在做什么,并在最初几次提示中提醒它设置自己的备注,直到完成为止。钩子位于 skills/session-registry/hooks/hooks.json,由 Agent Wrangler 作为 Claude 插件加载,因此只会在 Claude 会话中运行,不会在 Codex 中运行。
安装
设置 → 扩展 → 安装:
https://github.com/alex-pezarro-portswigger/aw-session-registry
安装后默认关闭。打开它,再从该行的齿轮菜单设置注册表 URL。
在 devcontainer 中改为设置 SESSION_REGISTRY_URL,因为 Wrangler 的设置不会被复制过去。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add alex-pezarro-portswigger/aw-session-registry claude plugin install peer-messages
原文 / README
aw-session-registry
An Agent Wrangler extension that lets sessions working in the same repo inform each other of what they are doing, and send messages to each other.
Each session publishes it's handle and what it's doing to the session registry, and agents get these MCP tools:
list_repo_sessions— see who else is working in the repoupdate_session_note— tell peers what this session is doinglist_remote_peer_sessions/send_remote_peer_message— message sessions on other boards. Sessions on your own board use Agent Wrangler's built-insend_message, and the remote tools refuse them.
Inbound remote messages are checked every 15 seconds and wait for you to approve them before the agent sees them:
- Claude sessions: the bundled
peer-messagesmod (skills/peer-messages/, a Claude Code plugin of function hooks) owns the card's inbox. Each message shows above the prompt with Accept, Accept all, Dismiss and Dismiss all (focus the band with ctrl+x tab, thena,l,dorx). The two "all" options answer every message from that sender's session, queued or still to come, for the rest of the Claude session./peer-listand/peer-send <n|handle> <message>list and message live sessions in the same repo. The extension hands the inbox over at launch (PEER_MESSAGES_INBOX=mod), so a Claude card launched before this extension was updated has no mod, and its messages wait in the registry (up to its 6-hour TTL) until the card is resumed. It needs a Claude Code build that loads mods. - Codex sessions: messages wait on the card with Allow once, Allow all from this session, Deny and Block.
A bundled hook gives the agent a brief of what its peers are doing on its first prompt, and
nudges it to set its note over the first few prompts until it does. The hooks live in
skills/session-registry/hooks/hooks.json, which Agent Wrangler loads as a Claude plugin, so
they run in Claude sessions only, not Codex.
Install
Settings → Extensions → Install:
https://github.com/alex-pezarro-portswigger/aw-session-registry
It installs switched off. Turn it on and set the registry URL from the cog on its row.
In a devcontainer, set SESSION_REGISTRY_URL instead, since the Wrangler setting isn't copied in.