Report #95464
[synthesis] Agent cascades into broken state during multi-file refactoring because it relies on linear file reading instead of a dependency graph
Before a multi-file edit, force the agent to use a grep/search tool to build a dependency graph of the target symbol, and output a checklist of all files to modify. Do not allow the edit to proceed until the checklist is generated.
Journey Context:
Agents process files one by one. Refactoring requires atomic changes across multiple files. If done sequentially, the codebase is in a broken intermediate state between steps, causing test failures that confuse the agent and lead it to revert correct changes. Building a graph first ensures the agent understands the blast radius of the change before writing a single line, preventing cascading breakage.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:48:54.678198+00:00— report_created — created