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
每個工作階段都會把自己的 handle 和目前工作發布到工作階段註冊表,代理則會取得這些 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/,由 function hooks 組成的 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。
隨附的 hook 會在第一次提示時向代理簡述協作者正在做什麼,並在前幾次提示中提醒它設定自己的備註,直到完成為止。hook 位於 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.