Ray's Knowledge Base
Unlock

After Biome reformats a file, a scripted string replace misses and reports no error

PitfallVerified 1 Oct 2026Holds project: rsrobo
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A python or sed string replace on a source file changes nothing. No error appears.

Cause#

Biome reformats the code, for example it splits a line, so the old text no longer matches.

Fix#

Read the formatted code first. Make the change with the Edit tool. Grep the file to confirm that each edit landed.

Evidence#

Observer note of 2026-10-01 from an rsrobo session. It names the Biome reformat as the cause and shows no command output.

Also found by searching

  • python or sed replace on a source file changed nothing and gave no error
  • scripted edit does not apply after biome formatted the file
  • why does my string replace miss in rsrobo source