# agent: Create checkpoint before/after every edit operation \(\#36253\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7671f34f88aefbaf75a313cf4b1fc0523cb7a43a

Requested commit: 7671f34f88aefbaf75a313cf4b1fc0523cb7a43a

Commit: 7671f34f88aefbaf75a313cf4b1fc0523cb7a43a

Tree: 6e58deaf23911d88d20cfda6f1f87b6828b44c39

Author: Oleksiy Syvokon

Committer: GitHub

## Message

```
agent: Create checkpoint before/after every edit operation (#36253)

1. Previously, checkpoints only appeared when an agent's edit happened
immediately after a user message. This is rare (agent usually collects
some context first), so they were almost never shown. This is now fixed.

2. After this change, a checkpoint is created after every edit
operation. So when the agent edits files five times in a single dialog
turn, we will now display five checkpoints.

As a bonus, it's now possible to undo only a part of a long agent
response.

Closes #36092, #32917

Release Notes:

- Create agent checkpoints more frequently (before every edit)
```

## Parents

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

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