Skip to content

Fix(coding-agent) Updated default prompt to also use xml boundaries instead of ## for clearer file seperation. #4709

Merged
badlogic merged 1 commit into
earendil-works:mainfrom
herrnel:fix/apply-explicit-fences-to-default-prompt
May 18, 2026
Merged

Fix(coding-agent) Updated default prompt to also use xml boundaries instead of ## for clearer file seperation. #4709
badlogic merged 1 commit into
earendil-works:mainfrom
herrnel:fix/apply-explicit-fences-to-default-prompt

Conversation

@herrnel

@herrnel herrnel commented May 18, 2026

Copy link
Copy Markdown
Contributor

Context:
This fix was originally made in this #4541 however it was only applied to custom prompts. This PR aims to make these changes consistent for custom and default prompts.

Solution:
System prompt's (System.md) and context files (AGENT.md, CLAUDE.md) are merged together using ## headers as a way to create file boundaries. Currently, context file boundaries can become unclear for agents when a user uses ## headers or worse # in their context files. A good solution is to use the less commonly used xml tags as file context boundaries instead of ## which are more commonly used.

Fix:

  • Replaced # Project Context with <project_context></project_context
  • Replaced ## fake/file/path/AGENTS.md with
    • <project_instruction path="fake/file/path/AGENTS.md"></project_instruction>

Example:

<project_context>

Project-specific instructions and guidelines:

<project_instructions path="fake/file/path/SYSTEM.md">  
content  
</project_instructions> 

<project_instructions path="fake/file/path/AGENTS.md">  
content  
</project_instructions> 

<project_instructions path="fake/file/path/AGENTS.md">  
content  
</project_instructions> 
 
</project_context>

Fixes: #4691

…of using ## so that agents are less likely to ingest a prompt with unclear boundaries.
@badlogic

Copy link
Copy Markdown
Collaborator

cheers

@badlogic badlogic merged commit aad8cf6 into earendil-works:main May 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default prompt still uses Markdown project context boundaries

2 participants