# agent: Don't pass back the diff on successful edits \(\#59335\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f16a46967b1f748003fa518609703f503e9d0d67)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f16a46967b1f748003fa518609703f503e9d0d67

Requested commit: f16a46967b1f748003fa518609703f503e9d0d67

Commit: f16a46967b1f748003fa518609703f503e9d0d67

Tree: e78891182347b5feec9e2170f0f4c27448480aaf

Author: Ben Brandt

Committer: GitHub

## Message

```
agent: Don't pass back the diff on successful edits (#59335)

Previous versions of the tool required passing the diff back because the
parent agent wouldn't have known the edits applied otherwise. Given that
we adapted this to use streaming tool calls now, this is redundant
information and wastes context windows, especially for local models.

We still pass the diff in the case that only some of the edits were
applied, but in the successful case, we just let the model know that the
edit was successful.

---

Release Notes:

- agent: Improve edit tool performance with more succinct success
response.
```

## Parents

- [9622ae92e12f91100b642881bf5026fc7cf1a6c9](https://git.cafe/gitcafe/zed/commit/9622ae92e12f91100b642881bf5026fc7cf1a6c9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f16a46967b1f748003fa518609703f503e9d0d67?format=markdown)
