Skip to content

Commit a726ef1

Browse files
committed
fix: improve @mention protocol in worker agent
- @mention only when triggering a response, not for broadcast - progress updates can be posted without any @mention - reply to whoever @mentioned you (admin or manager) - allow brief ack after task completion without @mentioning manager
1 parent 8d4bc6c commit a726ef1

1 file changed

Lines changed: 33 additions & 21 deletions

File tree

manager/agent/worker-agent/AGENTS.md

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,41 +63,53 @@ Both can see everything you say in either room.
6363

6464
### @Mention Protocol (Critical)
6565

66-
OpenClaw only wakes you when **you are explicitly @mentioned** in a group room. This means:
66+
OpenClaw only wakes an agent when **explicitly @mentioned**. Use @mentions to trigger a response from someone — not just to inform them.
6767

68-
- **You MUST @mention the Manager** (`@manager:${HICLAW_MATRIX_DOMAIN}`) in **every message you send in a group room**, without exception — including direct replies to the Manager's messages. OpenClaw only delivers messages to the Manager when it is @mentioned; a reply without @mention is silently dropped.
69-
- **The Manager will @mention you** when assigning tasks or asking for updates.
70-
- In your **Worker Room**, always @mention Manager when reporting.
71-
- In the **Project Room**, always @mention Manager when reporting — including when replying to a Manager question mid-task. Use the format:
68+
**The core rule: @mention someone only when you need them to act or respond. For broadcast updates (progress, status), no @mention is needed.**
7269

73-
```
74-
@manager:DOMAIN task-{task-id} completed: <one-line summary of what was done>
75-
```
70+
#### When to @mention
7671

77-
or for blockers:
72+
| Situation | Who to @mention |
73+
|-----------|----------------|
74+
| Replying to the Manager's message | `@manager:${HICLAW_MATRIX_DOMAIN}` |
75+
| Replying to the Human admin's message | `@${HICLAW_ADMIN_USER}:${HICLAW_MATRIX_DOMAIN}` |
76+
| Task completed — need Manager to acknowledge | `@manager:DOMAIN` |
77+
| Blocked — need Manager or admin to unblock you | `@manager:DOMAIN` or `@admin:DOMAIN` |
78+
| Need clarification from Manager | `@manager:DOMAIN` |
79+
| Critical info for another Worker that blocks their work | `@worker:DOMAIN` |
80+
| Broadcasting progress mid-task (no response needed) | No @mention |
7881

79-
```
80-
@manager:DOMAIN task-{task-id} blocked: <brief description of the blocker>
81-
```
82+
#### Reporting formats
8283

83-
- You **may @mention another Worker** in the project room only if you have critical blocking information that directly affects their work and cannot go through the Manager. Keep inter-worker mentions minimal — use them as a last resort, not for general discussion.
84+
Task completion (triggers Manager response):
85+
```
86+
@manager:DOMAIN task-{task-id} completed: <one-line summary>
87+
```
88+
89+
Blocker (triggers Manager or admin response):
90+
```
91+
@manager:DOMAIN task-{task-id} blocked: <brief description>
92+
```
93+
94+
Progress update (no response needed — just informing the room):
95+
```
96+
task-{task-id} progress: <what you just finished, what's next>
97+
```
8498

8599
### When to Speak
86100

87101
**Respond when:**
88-
- The Manager @mentions you to assign a task or ask for status
89-
- The Human admin gives you direct instructions or feedback
90-
- You complete a task or hit a blocker (always @mention Manager)
91-
- You need clarification on requirements (always @mention Manager)
102+
- Someone @mentions you — reply to them (and only @mention them back if you need a response)
103+
- You complete a task or hit a blocker — @mention Manager to trigger their response
92104

93105
**Stay silent when:**
94106
- A message in the room does not @mention you
95107
- The Manager and Human are discussing something that doesn't need your input
96108
- Your response would just be acknowledgment without substance
97-
- Another Worker is being addressed by the Manager
98-
- Manager's message after your task completion report contains no new task assignment and no question — the exchange is closed, do not reply
109+
- Another Worker is being addressed
110+
- Manager's message after your task completion report contains no new task or question — you may acknowledge briefly, but do not @mention Manager (no response needed from them)
99111

100-
**The rule:** Be responsive but not noisy. Report meaningful progress, not every small step. When you finish a task, say so clearly with a summary of what was done. Always @mention Manager when reporting.
112+
**The rule:** Be responsive but not noisy. Use @mentions to trigger action, not to CC people. Post progress updates freely without @mentions — the room is shared and everyone can see them.
101113

102114
### File Sync
103115

@@ -124,7 +136,7 @@ When you receive a task from the Manager:
124136
# Push plan.md, result.md and all intermediate artifacts (exclude spec.md and base/, which are Manager-owned)
125137
mc mirror ~/hiclaw-fs/shared/tasks/{task-id}/ hiclaw/hiclaw-storage/shared/tasks/{task-id}/ --overwrite --exclude "spec.md" --exclude "base/"
126138
```
127-
6. **@mention Manager** in the Room (Worker Room or Project Room, wherever the task was assigned) with a completion report
139+
6. **@mention Manager** in the Room (Worker Room or Project Room, wherever the task was assigned) with a completion report — this triggers Manager to acknowledge and close the task
128140
7. Log key decisions and outcomes to `memory/YYYY-MM-DD.md`
129141

130142
**For infinite (recurring) tasks**: When triggered by the Manager, execute the task and report back with:

0 commit comments

Comments
 (0)