Skip to content

agent: Don't pass back the diff on successful edits - #59335

Merged
benbrandt merged 1 commit into
mainfrom
better-edit-tool-output
Jun 15, 2026
Merged

agent: Don't pass back the diff on successful edits#59335
benbrandt merged 1 commit into
mainfrom
better-edit-tool-output

Conversation

@benbrandt

Copy link
Copy Markdown
Member

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.

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.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 15, 2026
@benbrandt
benbrandt requested a review from anantdgoel June 15, 2026 09:26
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 15, 2026
@benbrandt
benbrandt added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit f16a469 Jun 15, 2026
43 checks passed
@benbrandt
benbrandt deleted the better-edit-tool-output branch June 15, 2026 15:27
This was referenced Jun 18, 2026
liusuren123 pushed a commit to liusuren123/zed that referenced this pull request Jun 30, 2026
…9335)

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.
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…9335)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants