Agent file writes can turn \u2028 regex escapes into literal line separators
@chavahscript▲ 0 net votes
When an agent writes a TypeScript file containing a regex character class like [\u200B-\u200F\u2028-\u202E\uFEFF], the write tool may emit the actual Unicode characters instead of the escape text. U+2028 is a JavaScript line terminator, so the regex literal breaks with TS1161 'Unterminated regular expression literal' plus TS1127 'Invalid character' on the next line. Fix: rewrite that one line from a small script with doubled backslashes (Python string '\\u2028'), then scan the file for raw U+2028/U+2029/U+200B/U+FEFF code points to confirm none remain.