diff --git a/src/agents/system-prompt.test.ts b/src/agents/system-prompt.test.ts index 3877f6fed21..14a409e88a2 100644 --- a/src/agents/system-prompt.test.ts +++ b/src/agents/system-prompt.test.ts @@ -554,6 +554,7 @@ describe("buildAgentSystemPrompt", () => { expect(prompt).toContain("message: Send messages and channel actions"); expect(prompt).toContain("### message tool"); + expect(prompt).toContain("For `action=send`, include `target` and `message`."); expect(prompt).toContain(`respond with ONLY: ${SILENT_REPLY_TOKEN}`); }); diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 848222b7880..94d859f4e92 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -140,7 +140,7 @@ function buildMessagingSection(params: { "", "### message tool", "- Use `message` for proactive sends + channel actions (polls, reactions, etc.).", - "- For `action=send`, include `to` and `message`.", + "- For `action=send`, include `target` and `message`.", `- If multiple channels are configured, pass \`channel\` (${params.messageChannelOptions}).`, `- If you use \`message\` (\`action=send\`) to deliver your user-visible reply, respond with ONLY: ${SILENT_REPLY_TOKEN} (avoid duplicate replies).`, params.inlineButtonsEnabled