The invisible prefix is outside the approved prompt text
RFC 8259 says network JSON senders must not add a BOM, while allowing parsers to ignore one. It does not require every parser to accept or reject it. Microsoft also documents different PowerShell file-encoding defaults by version: Windows PowerShell's UTF8 option includes a BOM, whereas newer versions support UTF8 without it. This is a serialization issue before schema interpretation, not the same operation as normalizing visually similar characters inside a parsed prompt.
What to do next
- 01
Confirm the actual serialization problem
Treat Send valid JSON as a parse symptom, not proof that a BOM is present. With a trusted local byte viewer, inspect the exact file intended for the request; EF BB BF before the opening JSON token identifies a UTF-8 BOM. Also check that the file is genuinely UTF-8 JSON rather than UTF-16, an HTML document or an escaped string containing another document. Use a harmless synthetic reproduction for support instead of exposing private request content.
- 02
Write a clean network representation deliberately
Use an editor or serializer setting explicitly documented as UTF-8 without BOM. In modern PowerShell, select the supported utf8NoBOM encoding where appropriate; do not assume Windows PowerShell 5.1 interprets the same encoding name or default identically. Choose a version-appropriate documented writer rather than globally changing every script's encoding settings. Preserve all intended JSON field values, then read the saved bytes back. Renaming the file or deleting an arbitrary visible character is not a reliable encoding repair.
- 03
Validate locally before another submission
Parse the final file with the same relevant decoding and JSON-parsing behavior, then apply the normal supported-field and size checks. A small fixture containing an ordinary object and a copy prefixed with the three BOM bytes can isolate the mechanism without contacting any provider. If a previous action was accepted or its outcome is uncertain, retain its original payload and recovery identity. Do not silently rewrite an already approved request and replay it as though it were unchanged.
A concrete example
Illustrative diagnosis: two files both display an empty object in an editor, but one begins with EF BB BF. The local parse check distinguishes them. Saving a separate UTF-8-without-BOM copy removes that specific transport preamble without changing the object's values. This example does not establish that every parse failure has this cause or that any production request was tested.
Before you call it ready
- The raw prefix and actual encoding are inspected independently of the editor appearance.
- The replacement network file preserves the intended JSON values without a BOM.
- Local parsing precedes creation, and earlier uncertain actions retain their recovery identity.
When to stop or choose another method
Stop treating an invisible-prefix problem as a reason to buy credits, change models or normalize prompt text after approval. If the cleaned file still fails, investigate the next concrete syntax or contract error instead of deleting bytes indiscriminately.
