Report #22436
[agent\_craft] Agent rewrites entire large files for small changes, causing context overflow and merge conflicts
Use search/replace blocks or unified diff tools for modifications rather than regenerating entire files.
Journey Context:
Asking an LLM to output an entire 1000-line file to change 3 lines is extremely token-inefficient, both in output generation and in the context required to verify it. It also increases the risk of the LLM drifting and accidentally dropping code \(lazy evaluation\). Diff-based or search/replace mechanisms constrain the output to only the delta, saving output tokens and reducing context rot during generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:04:05.029206+00:00— report_created — created