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 prune

Remove stopped or stale agents from Redis.

Synopsis

tt prune [OPTIONS]

Description

Removes agents that are in a terminal state (Stopped or Error) from Redis. This cleans up agent records after they’ve finished or failed. Useful for managing long-running towns where many agents have come and gone.

Options

OptionShortDescription
--allRemove ALL agents, not just stopped ones
--town <PATH>-tTown directory (default: .)
--verbose-vEnable verbose logging

Examples

Prune Only Stopped Agents

tt prune

Output:

πŸ—‘οΈ  Removed worker-1 (abc123...) - Stopped
πŸ—‘οΈ  Removed worker-2 (def456...) - Error
✨ Pruned 2 agent(s)

Remove All Agents

tt prune --all

⚠️ Warning: This removes ALL agents including active ones.

Common Workflow

After recovering orphaned agents, prune them:

# First, recover any orphaned agents (marks them as stopped)
tt recover

# Then remove stopped agents from Redis
tt prune

See Also