Report #70765
[gotcha] User input breaking out of prompt delimiters
Use randomly generated, long delimiters \(e.g., UUIDs\) for user input boundaries, and encode user input \(e.g., JSON stringifying\) so special characters are escaped before insertion into the prompt.
Journey Context:
Developers use \#\#\# or """ to separate system prompt from user input. If the user input contains \#\#\#, the LLM interprets the rest of the user input as system instructions. Regex escaping is brittle. JSON encoding the input string is robust because it forces the LLM to treat it as a literal string value rather than executable prompt syntax.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:21:19.929260+00:00— report_created — created