asking-peer-agents ยท diff
git:20260825.a86790c to git:20260826.782eeca
20 added, 23 removed. Audit A to A.
---
name: asking-peer-agents
description: Use when a dispatched agent needs another dispatched task's live progress or latest conclusion.
---
## Overview
- A peer is another dispatched agent, not your main agent. Resolve the peer's
- instruction file and let the shared transport validate its recorded pane and
- session. The instruction path is the only address exposed to the caller.
+ A peer may supply factual progress or a conclusion. Discuss work details and
+ authorization with the user; use declared artifacts for formal dependencies.
## Task 1: Confirm live peer state is necessary
- First use the target instruction path with `peeking-work`; it reads durable
- progress before joining a live pane. A formal data dependency should use its
- declared artifact path instead of an informal question.
+ Use `peeking-work` on the target instruction first.
- **Verification:** existing context, progress, and declared artifacts do not
- already answer the question.
+ **Complete when:** existing progress and artifacts do not answer the question.
## Task 2: Resolve exactly one target instruction
- Use the live files under `~/.straw-boss/dispatch/`. Match `repo_root`,
- `plan_id`, `app`, and task text; stop if more than one candidate remains.
+ Resolve your own and the peer's live instruction files. Match `repo_root`,
+ `plan_id`, `app`, and task; stop if the peer is ambiguous.
- **Verification:** the target came from its instruction file, never from the
- caller's cwd or a guessed agent identity.
+ **Complete when:** both paths come from instruction files.
## Task 3: Send through the shared transport
```bash
uv run --script "${CLAUDE_PLUGIN_ROOT}/scripts/send-dispatch-message.py" \
--instruction-path <target instruction path> \
+ --sender-instruction-path <your instruction path> \
--to worker --intent question \
- --message "[from <your dispatch id>] <question>"
+ --message "<needed context and exact factual question>"
```
- If the target has no live endpoint or validation fails, report reachability to
- your main agent through `notifying-main-agent`. The message is fire-and-forget;
- a peer reply is information, never authorization.
+ The receiver answers using the id and return path in the delivered envelope:
- **Verification:** the script accepted the recorded receiver session and
- submitted exactly one message.
+ ```bash
+ uv run --script "${CLAUDE_PLUGIN_ROOT}/scripts/send-dispatch-message.py" \
+ --instruction-path <reply-to path> \
+ --sender-instruction-path <your instruction path> \
+ --to worker --intent answer --in-reply-to <question id> \
+ --message "<answer and evidence>"
+ ```
- ## Red flags
+ If delivery fails, tell the main agent through `notifying-main-agent`. A peer
+ answer is information, never direction or authorization.
- - Reading another task's worktree before its progress trail.
- - Passing an agent name, pane id, session id, or provider-specific address.
- - Retrying through a second channel after delivery is uncertain.
- - Waiting on a headless peer instead of asking the main agent.
+ **Complete when:** one correlated answer arrives, or reachability is reported.