Daemon Mode
Run Clew Code as a persistent background process for autonomous task execution, scheduled jobs, and continuous monitoring.
Overview
Daemon mode keeps Clew Code running in the background, processing tasks from a persistent queue, executing scheduled jobs via cron, and coordinating with other peers — all without an active terminal session.
Daemon Commands
❯ /daemon # Open daemon dashboard
❯ /daemon status # Check daemon status
Task Queue
The daemon uses a file-backed persistent task queue with:
- Lease-based concurrency — max 3 concurrent workers
- Exponential backoff retry — failed tasks are retried with increasing delays
- Dead-letter management — tasks that exceed retry limits are moved to dead-letter storage
Scheduling
Use cron syntax to schedule recurring tasks:
❯ /task add "0 9 * * *" "daily standup summary"
❯ /task list # list scheduled tasks
❯ /task remove <id> # remove a task
Agent Loop
The daemon integrates with the autonomous agent loop for 24/7 operation:
❯ /loop start # start the autonomous loop
❯ /loop stop # stop the loop
❯ /loop status # check loop status
See Agent Loop for details.