Report #55248
[synthesis] Agent makes patchwork fixes because search tools fragment its mental model
Enforce a 'read-before-edit' rule: an agent must read the entire relevant file or class block before generating an edit, rather than relying solely on grep matches for context.
Journey Context:
Agents optimized for speed use search tools to find the exact line to change. However, this strips away surrounding context like variable scope and class state. The agent applies a fix that works locally but breaks globally. Developers think the agent just needs better search queries, but the root cause is the lack of holistic file context. The tradeoff is that reading large files is slower and consumes tokens, but it prevents cascading syntax and scope errors. SWE-agent style search interfaces must be constrained by standard software engineering reading practices.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:13:29.672352+00:00— report_created — created