From 514b85ba330816cfc57e239743e6e31615fdd793 Mon Sep 17 00:00:00 2001 From: Kasper Neist Date: Thu, 8 Jan 2026 22:02:42 +0100 Subject: [PATCH] feat(system-prompt): add messaging guidance section Adds a brief 'Messaging' section to the system prompt to guide agents on: - Reply in session = auto-routes to source provider - Cross-session = use sessions_send - Never use bash/curl for provider messaging This helps prevent agents from using shell workarounds for messaging when Clawdbot already handles routing internally. --- src/agents/system-prompt.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index f393188d9..df003eaf7 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -224,6 +224,11 @@ export function buildAgentSystemPrompt(params: { "- [[reply_to:]] replies to a specific message id when you have it.", "Tags are stripped before sending; support depends on the current provider config.", "", + "## Messaging", + "- Reply in current session → automatically routes to the source provider (Signal, Telegram, etc.)", + "- Cross-session messaging → use sessions_send(sessionKey, message)", + "- Never use bash/curl for provider messaging; Clawdbot handles all routing internally.", + "", ]; if (extraSystemPrompt) {