---
title: "See the code the agent changed"
description: "Open the Code changes dialog to see which files the agent edited, and undo or redo a change from the header."
url: https://help.modeinspect.com/en/articles/49-see-the-code-the-agent-changed
collection: "Share and review"
updated: 2026-10-29
language: en
---

# See the code the agent changed

Open the Code changes dialog to see which files the agent edited, and undo or redo a change from the header.

Open the **Code changes** dialog to see every file the agent changed on this canvas, old code on the left and new code on the right. Glance at it to check the agent touched only what you asked for. The review itself happens in GitHub, see [Create a pull request](https://help.modeinspect.com/en/articles/46-create-a-pull-request.md).

**Before you start**

-   A canvas where the agent has made at least one code change. The header shows a green and red count, like **+1 −1**, as soon as there is one.
    

## Steps

1.  Click the **+1 −1** count in the canvas header. Its tooltip reads **View code changes**. In Build Mode it sits between the Undo and Redo arrows and the GitHub button.
    
    ![The right end of the Build Mode header: Undo, Redo, the +1 −1 count highlighted, the GitHub button, and Share](https://staticfiles.gleap.io/p6a1872808f187689a3937fa3/xzYiIufoKOYlEaqaOso95eNg4qp3CyNycyPW1RxDXmJI8XPlTFRoNeg10rBpwvP1yUpaDLCzCMN.png)
2.  Pick a file in the list on the left. The right side shows the file with removed lines in red and added lines in green.
    
    ![The Code changes dialog with 1 file changed, checkout-header.tsx selected in the file list, and the diff showing Secure checkout replaced by Safe checkout](https://staticfiles.gleap.io/p6a1872808f187689a3937fa3/3rftnyOf9Bnuv7gg7z7vDqoKvY3ROZyEekPFAeeg9bsiu1mKHUW8nLHkxLl0ZBiEMx7F10bVaJX.png)
3.  With many files, type part of a name in **Filter files…** to shorten the list.
    

The counts add up across the whole canvas, from the first change to the latest, not only the last message. The agent's reply in the chat shows the count for that one message. On a canvas with a GitHub repository, Build Mode also shows a **Changes** button with the same counts above the message field, and it opens the same dialog.

## Undo and redo a change

In Build Mode, the two arrows at the left of the count are Undo and Redo for code changes. Undo takes the codebase back one agent message: the page on the stage reloads without the change and the count drops. Redo brings it back. Both are unavailable while an agent is working.

If the canvas already has an open pull request, a dialog asks **Rewrite the open pull request?** before an undo or redo. **Continue** also updates the pull request, see [How changes reach your pull request](https://help.modeinspect.com/en/articles/47-how-changes-reach-your-pull-request.md).

## If it does not work

-   **No count in the header**: the agent has not changed any code on this canvas yet, or its last change was undone. Changes made on the canvas itself, like moving a frame, do not count.
    
-   **The dialog says "No code changes."**: the same. Close it and ask the agent for the change in Build Mode.
    
-   **The count is greyed out**: the changes are being reloaded after the last reply. Wait a moment.
    

## Related

-   [Create a pull request](https://help.modeinspect.com/en/articles/46-create-a-pull-request.md)
    
-   [How changes reach your pull request](https://help.modeinspect.com/en/articles/47-how-changes-reach-your-pull-request.md)
    
-   [What is Build Mode](https://help.modeinspect.com/en/articles/30-what-is-build-mode.md)

## Related

- [Create a pull request](https://help.modeinspect.com/en/articles/46-create-a-pull-request.md)
- [How changes reach your pull request](https://help.modeinspect.com/en/articles/47-how-changes-reach-your-pull-request.md)
- [Keep working after your pull request is merged](https://help.modeinspect.com/en/articles/44-keep-working-after-your-pull-request-is-merged.md)
- [Create a preview link](https://help.modeinspect.com/en/articles/45-create-a-preview-link.md)
- [Share a link to the page you are on](https://help.modeinspect.com/en/articles/48-share-a-link-to-the-page-you-are-on.md)
