# Rollback and recovery

> An autonomous mission can head the wrong way and an agent can crash. AgentForge takes checkpoints, preserves unfinished work and puts cards back in the queue.

- Canonical: https://www.zekfy.com/agentforge/features/rollback/
- Türkçe: https://www.zekfy.com/tr/agentforge/ozellikler/rollback/
- Last updated: 2026-12-04
- Capability: Checkpoints before and after a mission

## The Restore points tab: checkpoints

AgentForge takes a [checkpoint](https://www.zekfy.com/glossary/#checkpoint) automatically before a [mission](https://www.zekfy.com/glossary/#mission) starts and when it completes. A checkpoint is restored with one click, and the state before the restore is kept as a separate checkpoint.

For a project at the root of a git repository the checkpoint also records the code, including untracked files and excluding .gitignore entries and .forge. Taking the snapshot does not change the working tree, the index, HEAD or the stash. Restoring the code is a separate option that is off by default; when it is ticked, the files that would change are previewed.

When the code is restored, files are written back byte for byte; line endings are not changed. Files git ignores (such as .env) and nested repositories are never overwritten or deleted by a restore. Before the restore is confirmed, the preview lists anything that will be skipped, with the reason, and warns if the repository HEAD has changed since the checkpoint was taken or a merge or rebase is in progress. A "before restore" checkpoint is still taken automatically, so a restore can be undone.

## Features

The 5 features that make up this capability. Each is also listed in the overview of all features.

### Checkpoints (restore points)

A checkpoint is taken automatically before a mission and when it completes. A checkpoint is restored with one click, and the state before the restore is preserved too.

Listed under [Rollback and recovery](https://www.zekfy.com/agentforge/features/#checkpoints)

### Code snapshot

For a project at the root of a git repository the checkpoint also records the code, including untracked files and excluding .gitignore entries and .forge. The snapshot does not change the working tree, the index, HEAD or the stash. Restoring the code is off by default; before it is confirmed, the preview lists the files that would change and the paths that will be left alone, each with the reason. A restore writes files back byte for byte (line endings are not changed) and never overwrites or deletes files git ignores (such as .env) or nested repositories.

Listed under [Rollback and recovery](https://www.zekfy.com/agentforge/features/#code-snapshot)

### Recovering the card of a crashed agent

The card of an agent that crashed or closed returns to the queue with a retry counter. A live but silent [builder](https://www.zekfy.com/glossary/#builder) is nudged first and, if the silence continues, the card is requeued; past the retry limit the card is parked.

Listed under [Rollback and recovery](https://www.zekfy.com/agentforge/features/#crash-recovery)

### Mission closing report

When a mission completes, a Markdown report containing cards, [evidence](https://www.zekfy.com/glossary/#evidence), branches and cost is written automatically under .forge/reports/.

Listed under [Rollback and recovery](https://www.zekfy.com/agentforge/features/#mission-report)

### Persistent error log and diagnostics bundle

Errors are written to size-limited log files. A diagnostics bundle with secrets masked is created from Settings with one click.

Listed under [Rollback and recovery](https://www.zekfy.com/agentforge/features/#diagnostics)

## Questions about Rollback and recovery

### Does restoring a checkpoint change my code?

Not by default: an AgentForge checkpoint restores the board and control state, and the "also restore the code" option is separate and off. If the option is ticked, the files that would change and the paths that will be left alone are previewed first, with the reason, and a "before restore" checkpoint that includes the code is taken before restoring. Code is written back byte for byte, and files git ignores (such as .env) and nested repositories are never overwritten or deleted.

See also: [Checkpoint](https://www.zekfy.com/glossary/#checkpoint), [Restore points tab](https://www.zekfy.com/glossary/#restore-points)

### What happens to a task when an agent crashes?

The card of an agent that crashes or closes returns to the queue and can be assigned to another builder. AgentForge keeps a retry count for each card; when the retry limit is exceeded the card is parked and waits for the user.

See also: [Parked card](https://www.zekfy.com/glossary/#parked-card)

## Related guides

- [Troubleshooting](https://www.zekfy.com/docs/troubleshooting/): Common situations in AgentForge and what to do: MCP tools, profile arguments, shortcuts, agent browser error codes, token use and web mode start-up.

## Related feature pages

- [Control Plane](https://www.zekfy.com/agentforge/features/control-plane/): Approvals, evidence and rollback
- [Swarm](https://www.zekfy.com/agentforge/features/swarm/): A team with a coordinator and reviewers
- [Metrics](https://www.zekfy.com/agentforge/features/metrics/): What each agent costs and produces

- Previous feature: [Remote and phone access](https://www.zekfy.com/agentforge/features/remote-access/)
- Next feature: [Integrations and extensibility](https://www.zekfy.com/agentforge/features/integrations/)
- [All features](https://www.zekfy.com/agentforge/features/)
