Shape
Docs

Reviewing Edits

Keep or undo AI file changes after the agent writes them, or approve edits before they land.

In Code mode (and other editing modes), the assistant can change files as it works. Shape gives you two separate controls: review after write, and optional approval before write.

After edits land (default)

By default the agent writes files, then a strip above the chat input lets you Keep or Undo.

  1. The agent writes the updated file to disk.
  2. Chat shows an edit step with +/- line counts.
  3. Click the file in the pending strip to open a diff in the editor.
  4. Keep (or Keep All) dismisses the review and leaves the file as written.
  5. Undo (or Undo All) restores the file to how it was before this unresolved edit chain.

If the agent edits the same file again before you Keep or Undo, the review updates to the latest step. Undo restores the baseline from before the first unresolved edit on that file.

Enable Auto-apply agent edits in AI Settings to skip this strip and auto-Keep as edits arrive.

Require edit approval

Turn on Require edit approval in AI Settings to stage each file change before it is written.

The thread shows an approval card with the filename, +/- counts, and an expandable diff. Accept writes the edit (Ctrl+Enter). Skip discards it.

This is independent of the Keep / Undo strip. You can use both: approve the write, then still Keep or Undo afterward unless auto-apply is on.

Terminal commands

Separate from file edits, terminal commands follow Auto-run in AI Settings:

ModeBehavior
Ask every timeRun or Reject on each command
Auto (safe commands)Runs common safe commands; still asks for the rest
Run everythingRuns commands except hard-blocked ones

Protect destructive git (on by default) always asks before git reset, clean, restore, force-push, and similar, even in Run everything.

Session persistence

Kept and undone edits are tracked for the conversation. Reloading the project preserves which proposals you already resolved. If the agent edits a file again after you Keep it, a new review opens for that later change.

Edit