Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tt restart

Restart a stopped agent with fresh rounds.

Synopsis

tt restart <AGENT> [OPTIONS]

Description

Restarts an agent that is in a terminal state (Stopped or Error). Resets the agent’s state to Idle, clears any stop flags, and spawns a new agent process with fresh rounds.

The agent must already exist and be stopped. To create a new agent, use tt spawn.

Arguments

ArgumentDescription
AGENTName of the agent to restart

Options

OptionDescription
--rounds <N>Maximum rounds for restarted agent (default: 10)
--foregroundRun in foreground instead of backgrounding
--town <PATH>Town directory (default: .)
--verboseEnable verbose logging

Examples

Basic Restart

tt restart worker-1

Output:

πŸ”„ Restarting agent 'worker-1'...
   Rounds: 10
   Log: .tt/logs/worker-1.log

βœ… Agent 'worker-1' restarted

Restart with More Rounds

tt restart worker-1 --rounds 20

Restart in Foreground

tt restart worker-1 --foreground
# Agent runs in terminal, you see all output

Error: Agent Still Active

tt restart worker-1

Output:

❌ Agent 'worker-1' is still active (Working)
   Use 'tt kill worker-1' to stop it first

Error: Agent Not Found

tt restart nonexistent

Output:

❌ Agent 'nonexistent' not found

Restart vs Spawn

CommandUse Case
tt restartRevive existing stopped agent (keeps ID)
tt spawnCreate brand new agent (new ID)

Common Workflow

After agent exhausts its rounds:

# Check status
tt status
# Shows: worker-1 (Stopped) - completed 10/10 rounds

# Restart with more rounds
tt restart worker-1 --rounds 15

See Also