From e2fd651eb92a22fcb5e390fb41f78239e2eba4cd Mon Sep 17 00:00:00 2001 From: Nelson Herrera Date: Sat, 16 May 2026 19:10:09 -0700 Subject: [PATCH] Updated system-prompt.ts to use xml boundaries during system and context file merging rather than using `##` so that agents are less likely to ingest a prompt with inconsistent boundaries. --- packages/coding-agent/src/core/system-prompt.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/src/core/system-prompt.ts b/packages/coding-agent/src/core/system-prompt.ts index 6e4749926..3675e4133 100644 --- a/packages/coding-agent/src/core/system-prompt.ts +++ b/packages/coding-agent/src/core/system-prompt.ts @@ -59,11 +59,12 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions): string { // Append project context files if (contextFiles.length > 0) { - prompt += "\n\n# Project Context\n\n"; + prompt += "\n\n\n\n"; prompt += "Project-specific instructions and guidelines:\n\n"; for (const { path: filePath, content } of contextFiles) { - prompt += `## ${filePath}\n\n${content}\n\n`; + prompt += `\n${content}\n\n\n`; } + prompt += "\n"; } // Append skills section (only if read tool is available)