Edit tool: show agent and human same proper diff view when presenting edits for approval
Problem
When the Edit tool presents a proposed change for user approval, it shows the full old_string and new_string as plain text blocks. For large edits, it's difficult to see exactly what changed — what lines were added, removed, or modified.
This caused a real communication breakdown: the user rejected an edit and pointed at specific lines they wanted removed from the proposed replacement text. The agent misinterpreted this as referring to the original file's line numbers, because there's no visual distinction between added/removed/unchanged lines. The user had to repeat themselves three times before the issue was understood.
Suggestion
Show a proper diff view (green/red or +/- for added/removed lines) when presenting Edit tool changes for approval. This would:
- Make it unambiguous for users to point at specific lines in the diff
- Make it easier for the agent to re-check its own output against rejection feedback
- Clarify what's being added vs removed vs unchanged in large replacements
Current behavior
The edit is presented as two plain text blocks — the old text and the new text — with no visual indication of what specifically changed between them.
Desired behavior
A unified or side-by-side diff showing which lines are added, removed, or unchanged, similar to git diff output.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗