# Unsaved changes and Push

> See what the builder has staged, test your agent against it, and save it to the branch as a new commit with Push, without making anything live.

- Source: https://www.aui.io/help/building/unsaved-changes-and-push
- Section: Building with the Agent Builder
- Last updated: November 23, 2026

When the Agent Builder edits your agent in Build mode, the edits are not saved to the branch straight away. They are held in the session as **unsaved changes**, so you can test them first. **Push** saves them to the branch as a new commit. Making a commit live for customers is a separate step.

## See that there are unsaved changes

- An **Unsaved changes** chip appears beside the **AGENT BUILDER** heading.
- In **All sessions**, the session shows the **Unsaved changes** status.
- If the builder pane is hidden, the **Open Builder** item in the side rail says that staged edits are waiting.
- In the **Program files** view (`</>` in the builder header), the header counts the unsaved changes and each changed file is marked as new, modified or deleted. See [Read the program files](https://www.aui.io/help/agent-program/read-program-files).

## Test against unsaved changes

While changes are unsaved, every conversation you have in the Playground runs against the changed agent: new threads, messages you re-run, the builder's own test conversations and simulated callers. Customers keep getting the live commit, because nothing has been saved or made live.

> [!WARNING]
> Testing against unsaved changes does not make a conversation sandboxed. It uses the agent's integrations as they are: if one points at a real system, actions in your test are real. See [Talk to your agent](https://www.aui.io/help/testing/talk-to-your-agent).

## Push your changes

The push bar appears above the builder's composer whenever the session has something to push.

![Close crop of the Agent Builder pane in dark mode for the ACME Air Rebooking Agent with an Unsaved changes chip. The transcript shows the builder's summary of the build and test results. Above the composer, a notification banner sits over the push bar, which shows a commit icon, the Commit message field with the suggested message in quotes beginning 'I've captured the scope: own-trip questions', and a Push button.](https://www.aui.io/assets/help/building/unsaved-changes-and-push/push-bar.png)

*Leave the field empty to use the builder's suggested message.*

1. Read the builder's suggested message, shown in quotes under the **Commit message** field. Hover it to see all of it.
2. To use it, leave the field empty. To write your own, type in the field; your text replaces the whole suggestion. A good message says what changed and why, for example `Add $15 convenience fee to cancellations made through the agent`.
3. Click **Push**, or press <kbd>↵</kbd> in the field.

[Clip: After you click Push, the bar confirms the new commit is on its branch and not live.](https://www.aui.iohttps://pxjl3qwxvjcixvl1.public.blob.vercel-storage.com/help/building/unsaved-changes-and-push/push-74135508169c.mp4)

*Dark mode, the Playground after a push. In the Agent Builder pane a green bar reads Pushed v0.2, build bundle 1, on its branch, not live, with a close button. The branch pill in the top bar shows v0.2, and the builder's summary of its test conversations is above the bar.*

The bar turns green and reads **Pushed** with the new commit's tag, with a note that it is on its branch and not live. Close the note with **×**. The session carries on, and the next edits you ask for can be pushed again.

**Push** is unavailable while the builder is working: the field says it is waiting for the current turn to finish. The bar is also hidden while a builder question is waiting for your answer.

## What Push does and does not do

| Push does | Push does not |
|---|---|
| Save the session's changes as a new commit on the branch you have open, with your message | Make anything live. Customers keep getting the live commit. |
| Give the commit the next tag on that branch | End the session |
| Make the commit available to everyone on the agent, in the **Branches** window and to the Apollo CLI | Run a regression or an evaluation |

To give customers the new commit, open the **Branches** window from the branch pill and choose **Make live**. See [Make a commit live, lock a branch, and roll back](https://www.aui.io/help/branches/make-a-commit-live).

## When Push takes a different path

**The branch is locked.** The push bar says the branch is locked and that pushing creates a new draft. Pushing then starts a new draft branch with your changes, and the session follows it. The locked branch is not touched.

**Someone pushed first.** If a teammate pushed to the branch after your session started, the push is refused and the bar names who pushed which commit. Nothing is overwritten. Choose one:

- **Bring in**, followed by the teammate's commit tag: the builder brings their commit into your session. Check the result, then push again.
- **Push as a new branch**: your changes go to a new draft branch cut from the commit you started on, so both lines of work are kept.

**What's the diff?** explains the two options.

**The program has problems.** If the changed program does not pass its checks, the push is refused and a red line under the bar shows the first problem and how many there are. Click **View error** for the details, or **Copy the full error**. Ask the builder in Build mode to fix them, then push again.

## Discard unsaved changes

To undo part of a change, ask the builder in Build mode, for example "Undo the fee change but keep the new wording." It edits the program back and the result stays unsaved until you push.

To drop all of the unsaved changes:

1. Click **New session** (**+**) in the builder header.
2. A note above the composer shows how many unsaved changes are on the branch, and explains that a new session starts from the last commit and does not see them.
3. Click **Discard** to drop them. The working copy goes back to the last commit, and the builder confirms how many files it discarded.

Click **See changes** instead to reopen the session that made them.
