# Fix stale edits \(\#42895\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 23872b0523652508ea0e149ac622fec0954473d4

Requested commit: 23872b0523652508ea0e149ac622fec0954473d4

Commit: 23872b0523652508ea0e149ac622fec0954473d4

Tree: 0a511d21134b12def3c67d68c208adf992a14481

Author: Richard Feldman

Committer: GitHub

## Message

```
Fix stale edits (#42895)

Closes #34069

<img width="532" height="880" alt="Screenshot 2025-11-17 at 11 14 19 AM"
src="https://github.com/user-attachments/assets/abc50c32-d54d-4310-a6e6-83008db7ed81"
/>

<img width="525" height="863" alt="Screenshot 2025-11-17 at 12 22 50 PM"
src="https://github.com/user-attachments/assets/15a69792-c2c7-4727-add9-c1f9baa5e665"
/>

Release Notes:

- Agent file edits now error if the file has changed since last read
(allowing the agent to read changes and avoid overwriting changes made
outside Zed)
```

## Parents

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

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