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
| Option | Short | Description |
|---|---|---|
--all | Remove ALL agents, not just stopped ones | |
--town <PATH> | -t | Town directory (default: .) |
--verbose | -v | Enable 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
- tt recover β Detect and clean up orphaned agents
- tt reset β Full town reset
- tt kill β Stop a specific agent