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.
This commit is contained in:
Kasper Neist
2026-01-08 22:02:42 +01:00
parent 0dbb569187
commit 514b85ba33

View File

@@ -224,6 +224,11 @@ export function buildAgentSystemPrompt(params: {
"- [[reply_to:<id>]] 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) {