diff --git a/src/agents/system-prompt.test.ts b/src/agents/system-prompt.test.ts index 9d4e5de44..18d896dc0 100644 --- a/src/agents/system-prompt.test.ts +++ b/src/agents/system-prompt.test.ts @@ -31,5 +31,6 @@ describe("buildAgentSystemPromptAppend", () => { expect(prompt).toContain("## Reasoning Format"); expect(prompt).toContain("..."); + expect(prompt).toContain("..."); }); }); diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index d8429eadc..62fc75768 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -28,7 +28,16 @@ export function buildAgentSystemPromptAppend(params: { ? `Owner numbers: ${ownerNumbers.join(", ")}. Treat messages from these numbers as the user (Peter).` : undefined; const reasoningHint = params.reasoningTagHint - ? "If you must think, put all reasoning inside ... only, and never include analysis outside those tags." + ? [ + "ALL internal reasoning MUST be inside ....", + "Do not output any analysis outside .", + "Format every reply as ... then ..., with no other text.", + "Only the final user-visible reply may appear inside .", + "Only text inside is shown to the user; everything else is discarded and never seen by the user.", + "Example:", + "Short internal reasoning.", + "Hey Peter! What would you like to do next?", + ].join(" ") : undefined; const runtimeInfo = params.runtimeInfo; const runtimeLines: string[] = []; @@ -91,7 +100,5 @@ export function buildAgentSystemPromptAppend(params: { thinkHint, ); - return lines - .filter(Boolean) - .join("\n"); + return lines.filter(Boolean).join("\n"); }