---
title: "Restart Strategies"
description: "Supervisors monitor child agents and restart them when they fail. The restart strategy determines how failures are handled. When one agent fails, only that agent is restarted. Other agents continue running. Use when: Age"
resource: https://www.aiagents.nexus/docs/manual/supervisors/restart-strategies
generated: { by: "process:nexus-agent-assets", at: 2026-09-07T09:13:03Z }
status: stable
---

# Supervisor Restart Strategies

Supervisors monitor child agents and restart them when they fail. The restart strategy determines how failures are handled.

## Available Strategies

### one-for-one

When one agent fails, only that agent is restarted. Other agents continue running.

```
Before:  [Agent A ✓] [Agent B ✗] [Agent C ✓]
After:   [Agent A ✓] [Agent B ✓] [Agent C ✓]
                          ↑
                     restarted
```

**Use when:** Agents are independent and don't share state.

```bash
naos supervisor create main --strategy one-for-one
```

### one-for-all

When one agent fails, ALL agents are restarted.

```
Before:  [Agent A ✓] [Agent B ✗] [Agent C ✓]
After:   [Agent A ✓] [Agent B ✓] [Agent C ✓]
              ↑           ↑           ↑
           restarted   restarted   restarted
```

**Use when:** Agents share state and must be consistent.

```bash
naos supervisor create main --strategy one-for-all
```

### rest-for-one

When one agent fails, that agent and all agents started AFTER it are restarted.

```
Start order: A → B → C → D
B fails:

Before:  [Agent A ✓] [Agent B ✗] [Agent C ✓] [Agent D ✓]
After:   [Agent A ✓] [Agent B ✓] [Agent C ✓] [Agent D ✓]
                          ↑           ↑           ↑
                     restarted   restarted   restarted
```

**Use when:** Later agents depend on earlier agents.

```bash
naos supervisor create main --strategy rest-for-one
```

## Choosing a Strategy

| Scenario | Strategy |
|----------|----------|
| Independent workers | one-for-one |
| Shared database connection | one-for-all |
| Pipeline with dependencies | rest-for-one |
| Default choice | one-for-one |
