-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
Description
Description
Sourced from my AGENTS.md after my failure analysis workflows did hexdumps of diffs and identified a common failure (30% of edits to python code files have tool control delimiters embedded in them)
Edit Tool Usage Guidelines
Delimiter Conflict Prevention
CRITICAL: The edit tool interprets certain XML/HTML-like tags as control delimiters. Including these tags in content can cause edit operations to fail or corrupt files.
Problematic Tags
The following tags are interpreted as edit tool delimiters and must be avoided in content:
</content>- End of content delimiter</parameter- Parameter delimiter</edit>- Edit operation delimiter</file>- File delimiter
Safe Content Inclusion
If you need to include these patterns in code, use character transformation:
# Transform delimiters to safe placeholders
echo '[/content]' | tr '[]' '<>' # Produces </content> safely
echo '[parameter]' | tr '[]' '<>' # Produces <parameter> safelyOpenCode version
1.0.63
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Arch Linux
Terminal
Headless