[codex] Bias group chat prompts toward subagent delegation (#74046) · openclaw/openclaw@ab39f2b
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -63,10 +63,12 @@ describe("prompt composition invariants", () => {
|
63 | 63 | const eventTurn = getTurn(groupScenario!, "t3"); |
64 | 64 | |
65 | 65 | expect(first.systemPrompt).toContain("You are in a Slack group chat."); |
| 66 | +expect(first.systemPrompt).toContain("prefer delegating bounded side investigations early"); |
66 | 67 | expect(first.systemPrompt).toContain("Activation: trigger-only"); |
67 | 68 | expect(first.systemPrompt).toContain('reply with exactly "NO_REPLY"'); |
68 | 69 | expect(first.systemPrompt).not.toContain("## Silent Replies"); |
69 | 70 | expect(steady.systemPrompt).toContain("You are in a Slack group chat."); |
| 71 | +expect(steady.systemPrompt).toContain("prefer delegating bounded side investigations early"); |
70 | 72 | expect(steady.systemPrompt).toContain('reply with exactly "NO_REPLY"'); |
71 | 73 | expect(steady.systemPrompt).not.toContain("## Silent Replies"); |
72 | 74 | expect(steady.systemPrompt).not.toContain("Activation: trigger-only"); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,6 +31,8 @@ describe("group runtime loading", () => {
|
31 | 31 | "You are in a WhatsApp group chat. Your replies are automatically sent to this group chat. Do not use the message tool to send to this same group - just reply normally.", |
32 | 32 | ); |
33 | 33 | expect(groupChatContext).toContain("Minimize empty lines and use normal chat conventions"); |
| 34 | +expect(groupChatContext).toContain("prefer delegating bounded side investigations early"); |
| 35 | +expect(groupChatContext).toContain("Keep the critical path local"); |
34 | 36 | expect(groupChatContext).toContain('reply with exactly "NO_REPLY"'); |
35 | 37 | const toolOnlyContext = groups.buildGroupChatContext({ |
36 | 38 | sessionCtx: { ChatType: "group", Provider: "discord" }, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -245,6 +245,9 @@ export function buildGroupChatContext(params: {
|
245 | 245 | lines.push( |
246 | 246 | "Write like a human. Avoid Markdown tables. Minimize empty lines and use normal chat conventions, not document-style spacing. Don't type literal \\n sequences; use real line breaks sparingly.", |
247 | 247 | ); |
| 248 | +lines.push( |
| 249 | +"When subagent or session-spawn tools are available and a directly requested group-chat task will require several tool calls, prefer delegating bounded side investigations early so the channel gets a responsive path forward. Keep the critical path local, avoid subagents for simple one-step work, and only surface concise group-visible updates when they add value.", |
| 250 | +); |
248 | 251 | const canUseSilentReply = |
249 | 252 | !messageToolOnly && |
250 | 253 | params.silentToken && |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。