# Auto-restart

Auto-restart relaunches a command after it exits unexpectedly.

## Behavior

When auto-restart is enabled, Solo watches the running command and starts a fresh instance after a crash or unexpected exit. The restart keeps the last crash output in the terminal and adds a restart banner before new output appears.

Solo rate-limits crash restarts to avoid a tight loop: after 10 restarts in a 60-second window, [auto-restart pauses](../notifications/auto-restart-notifications.md) for that command and Solo shows an [exhausted auto-restart indicator](./status-indicators.md).

## Configure

Enable auto-restart in the command settings with **Edit command...**, or set `auto_restart: true` for the command in `solo.yml`.

## Notes

- Auto-restart only applies to command processes. Terminals and agents do not use this setting.
- Solo will not start an [untrusted command](./trust-security.md), so auto-restart has no effect until you trust it.
- Auto-restart is separate from [file-watch auto-restart](./file-watch-auto-restart.md), which restarts based on file changes rather than crashes.
- Crash auto-restart is disabled during app shutdown.
- If a command keeps crashing, preserve its output and follow the [live application debugging workflow](../workflows/debug-live-application.md) before repeated manual restarts hide the useful evidence.

---

Are you a human? Read this doc on the web: https://soloterm.com/docs/commands/auto-restart
