Report #69858
[agent\_craft] Agent reads the entire file to understand a small change, wasting context and confusing the diff application
Provide context as unified diff hunks or search/replace blocks rather than whole files when requesting edits, and use tools that return only the relevant function/class, not the whole file.
Journey Context:
Passing whole files into the context for a 5-line edit is inefficient and leads to the model hallucinating unchanged parts of the file when outputting the result. By forcing the agent to request and emit diffs or search/replace blocks, the context remains focused on the delta, and the application is deterministic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:44:49.654171+00:00— report_created — created