Skip to main content
Every message in Agent Mode creates a checkpoint, a saved snapshot of your conversation and everything the agent has built so far. You can return to any checkpoint with rollback, or split off a new conversation from any checkpoint with branching.
Branching and rollback are available in Agent Mode only. They are not available in Chat Mode.

Rollback

Rollback returns your conversation to a previous point. The agent’s sandbox, including all files, code, and project state, is restored to exactly how it was at that message. Any messages after the rollback point are removed. The canvas state is also restored if you are working on a canvas.
1

Find the message you want to return to

Scroll up in the conversation to locate the assistant message you want to roll back to.
2

Click the Rollback button

Hover over the message. A Rollback button appears. Click it.
3

Continue from that point

The conversation rewinds to that message. All messages after it are removed, and the sandbox is restored to its state at that point. You can now send a new message to take the conversation in a different direction.
Rollback is permanent. Messages after the rollback point are deleted and cannot be recovered. If you want to preserve your current state before rolling back, use branching first.

When to use rollback

Rollback is useful when the agent went in a direction you did not want. Instead of trying to undo changes through follow-up messages, roll back to the last good state and give the agent a different instruction.

What you cannot do with rollback

  • You cannot roll back in Chat Mode.
  • You cannot roll back to a message that does not have a checkpoint. Checkpoints are created after each assistant response in Agent Mode.
  • You cannot undo a rollback once it is done.

Branching

Branching creates a new, independent conversation starting from any message in your current chat. The new chat gets its own copy of the sandbox, cloned from the snapshot at that message. Any websites deployed from the original chat are also cloned to the new branch. Your original conversation stays exactly as it is. Nothing changes in the source chat.
1

Find the message you want to branch from

Scroll to the message in the conversation where you want the new branch to start.
2

Click the Branch button

Hover over the message. A Branch button appears. Click it.
3

Work in the new chat

A new chat opens with the conversation up to that point. A divider in the chat shows where the branch was created. The sandbox is a fresh copy from that moment. You can now take this conversation in any direction without affecting the original.

When to use branching

Branching is useful when you want to try multiple approaches without committing to one. For example, you are building a website and want to test three different designs. Branch the chat at the point before the agent starts the design, then give each branch a different set of instructions. Keep the one you like best. It is also useful before a rollback. If you are unsure whether you want to go back, branch first to preserve your current progress, then roll back in the original conversation.
You can branch as many times as you want from the same message. Each branch is fully independent.

What you cannot do with branching

  • You cannot branch in Chat Mode.
  • You cannot branch from a message that does not have a checkpoint.
  • You cannot merge two branches back into one conversation.

Next steps