Edit fails because anchors in a shared utility module are not unique. What should the civic coding agent do?
Select an answer to reveal the explanation.
Short Explanation
When Edit can't find a unique door handle in that shared utility, stop jiggling—Read the room, then Write the whole change cleanly.
Full Explanation
Edit depends on unique anchor text to apply a precise patch. When anchors in a shared utility module are not unique, the civic coding agent should fall back to Read then Write: read the full relevant file (or section), formulate the complete updated content, and Write it, rather than endlessly retrying a non-unique Edit.
Why the correct option works: Read establishes ground truth; Write replaces content when surgical Edit cannot lock onto a single match. Shared municipal utilities often repeat similar helpers or comments, so non-unique anchors are common. The fallback preserves progress without destructive shortcuts.
Why the other three fail by concept: keeping retrying the same non-unique Edit until timeout wastes the session and never converges. Deleting the utility module with Bash and rewriting from memory alone risks catastrophic loss and hallucination of civic business rules. Switching permanently to Grep for all future file modifications confuses search with mutation—Grep does not apply edits.
Exam caveat: prefer Edit when anchors are unique; Read+Write is the recovery path, not the default for every tiny change. Operational check: on Edit failure for non-unique anchors, Read the utility, apply the change via Write, and re-Grep to confirm only intended call sites/definitions changed.