Docs › Using the editor › Reviewing the agent's changes
Reviewing the agent's changes
Keep or undo what the agent changed: one change at a time at the cursor, a file at a time, or a whole run, and ask for a second look.
On this page
- In the file
- At the cursor, from the keyboard
- In a diff
- In the chat
- Where the controls sit
- What undo does
- Find Issues in Agent Changes
- If something goes wrong
Every change the agent makes is written to your files straight away, so you can run and test it, but it stays pending until you decide. You can keep or undo it a hunk at a time, a file at a time, or the whole run at once, from the editor or from the chat. Edit Selection changes are reviewed the same way.
In the file
Open a file the agent changed and each pending change is marked, with buttons above it:
- Keep and Undo above each change.
- When a file has more than one change, Keep file (N changes) and Undo file above the first one still pending.
- With the default Breadcrumb control location, also ✓ Keep (agent change), ↩ Undo and ⚑ Report for the run that made the change.
At the cursor, from the keyboard
| Command | Keys |
|---|---|
| AstraCode: Keep the Agent's Change at the Cursor | Cmd+Y (Ctrl+Y on Windows and Linux) |
| AstraCode: Undo the Agent's Change at the Cursor | Cmd+N (Ctrl+N on Windows and Linux) |
| AstraCode: Next Change | Option+Cmd+] (Ctrl+Alt+] on Windows and Linux) |
| AstraCode: Previous Change | Option+Cmd+[ (Ctrl+Alt+[ on Windows and Linux) |
Cmd+Y and Cmd+N act on the change the cursor is in, and only there: anywhere else they keep their usual meaning in the editor. Next Change and Previous Change jump between pending changes across files, so you can walk a whole run with the keyboard: next, read, keep or undo, next. With nothing pending they say No changes from this run are awaiting review.
In a diff
Run AstraCode: Review Agent Changes to open every pending change, from every run, in one diff editor titled Agent Changes. Review on a run card opens the same view for that run only.
- Keep and Undo in the gutter beside each change.
- Keep File and Undo File on each file.
- Keep All and Undo All in the editor's title bar.
With nothing pending, it says No agent changes are waiting to be reviewed.
In the chat
- The run card above the composer: Keep, Undo and Review for the whole run, and ✓ or ✕ for each file.
- The changes bar: Keep all, Undo all and Review for everything still undecided.
- Review · N at the top of the panel, or Review on the changes bar, opens a review view inside the panel: Accept all, Reject all, Find issues, ‹ Prev and Next ›, and for each file Accept file and Reject. Click a file's path to open its diff.
- Each edit card in the transcript has Keep and Undo for its file.
See The chat panel for the run card in full.
Where the controls sit
Review Control Location in AstraCode Settings, General (astracode.review.controlLocation) chooses where the run-level controls go:
| Option | Value | What you get |
|---|---|---|
| Breadcrumb (default) | breadcrumb | ✓ Keep (agent change), ↩ Undo and ⚑ Report above the change in each file. |
| Status bar | island | A status bar item, N to review, that opens Review Agent Changes. Fewer buttons in your code. |
Keep and Undo on each change appear either way.
What undo does
- Undo puts the file back as it was before the agent changed it. A file the agent created is removed.
- If you edited the file yourself after the agent wrote it, undo leaves it alone and says
Left alone: <file> has changed since the agent wrote it, so your own work is never lost. - Keep simply stops tracking the change: the file already has it.
- To go back further than one run, rewind the chat to before a message. See Checkpoints and undo.
Find Issues in Agent Changes
A second look before you keep a run. AstraCode: Find Issues in Agent Changes, or Find issues in the panel's review view, asks the agent to review only the pending changes, not your whole branch.
- Run AstraCode: Find Issues in Agent Changes.
- A review runs in the chat, titled Find issues in this change (or these N changes), so you can watch what it reads.
- Findings land in the Problems panel, from AstraCode review, on the line they are about. A new review replaces the last one's findings.
It needs no git: it works on a new file, a repository with no commits, or a folder that is not a repository. Up to 120,000 characters of diff are sent. With nothing pending it says No agent changes are waiting. Use "Review This Branch" to review everything since the branch point. To review the whole branch, see Git.
If something goes wrong
- Cmd+Y or Cmd+N does something else. The cursor is not inside a pending change. Move it into one, or use Next Change.
- An undo did nothing to a file. It was edited after the agent wrote it; see the Left alone message. Undo your own edits first, or rewind the chat.
- No buttons in the file. With Status bar chosen, the run controls are in the status bar instead; Keep and Undo still show on each change.
More in Agent run problems.
← Edit and ask about a selection Git: commit messages, branch review and conflicts →
All documentation
Get started
Using the editor
- Tab completion
- Edit and ask about a selection
- Reviewing the agent's changes
- Git: commit messages, branch review and conflicts
- Dictation
- Layout, themes and the settings page
Agent
- Agent overview
- Agent, Plan, Ask and Debug
- Approvals and permissions
- Plan mode
- Debug mode
- Tools
- Browser tools
- How the agent checks its work
- Checkpoints and undo
- Running several agents at once
- Subagents and background tasks
- Remote agents in GitHub Actions
- Infrastructure as code
Context
Workspaces
Connectors
- Connectors (MCP servers)
- Connector configuration reference
- Use AstraCode from Claude, ChatGPT and other apps
Extending AstraCode
CLI
Account and usage
- Usage and limits
- Bring your own key
- What AstraCode sends and keeps
- Reporting a problem and getting help
Troubleshooting
- Troubleshooting
- Sign-in problems
- Install and update problems
- Chat panel problems
- Agent run problems
- Connector problems
- Dictation problems
- Usage, billing and network errors
- CLI problems