write cannot recover information it never received.Find the first divergent boundary.
Keep the exact requested fixture, including invisible and escape-sensitive characters.
Capture structured content, old_string, and new_string.
Read the narrow changed range and hash exact bytes when required.
Retain the native syntax, schema, build, or browser failure.
Route ownership from evidence.
Model construction or another program string consumed the character.
Investigate the filesystem tool or provider boundary.
Inspect encoding, line endings, transformation, CSP, and target semantics.
One repeated failure is enough to split the artifact and preserve the first evidence. More escaping guesses increase cost without locating ownership.
Give each language one source file.
Keep HTML, OpenAPI, JavaScript, shell, Python, and CSS independent. Validate each with its native parser, checkpoint its digest, then create single-file output through a deterministic build only when distribution requires it.
Avoid an extra run_code program string when the artifact is already text.
Insert one uniquely delimited block and read it back immediately.
Syntax and schema validation stop the pipeline at the owning language.
Generated bundles are output, never the hand-edited source of truth.
Primary evidence.
- Embedded-code report #4699
- Write-boundary investigation #2373
- rc.2 literal write source
- rc.2 literal edit source
Preserve evidence before repairing text.
The complete guide includes the representation ladder, source layout, bounded procedure, literal-edit safety, failure router, edge-case fixtures, and twelve acceptance tests.
Read the complete guide