Prevent UnicodeEncodeError when model text contains U+D800-range surrogates by sanitizing to U+FFFD before writing to UTF-8 stdout. Co-authored-by: Cursor <cursoragent@cursor.com>