Run Long-Running Coding Tasks Across Sessions with Durable /loop
Ensure background coding tasks survive system reboots or session restarts.
Use the Durable /loop feature to schedule persistent background tasks that automatically resume and catch up after a system restart.
The Scenario
You have a long-running code refactoring or a periodic data scraping task that needs to run over several days, but you need to shut down your laptop at the end of the day.
Before & after
You would typically leave a terminal window open indefinitely or use complex 'nohup' commands, risking progress loss if the system restarts. This manual monitoring and setup takes 15–20 minutes.
Run the '/loop' command with your task description; the system now persists tasks to disk, resuming them even if you shut down your terminal. It takes about 2 minutes to set up a durable background process.
The Prompt
/loop [DESCRIBE_YOUR_SCHEDULED_TASK_OR_PERIODIC_CODING_JOB] --durable
The new 'Durable /loop' feature persists scheduled tasks to files. If you miss a periodic execution window because your computer was off, the system automatically runs a 'catch-up' cycle upon the next launch.
Source
Qwen Code Blog: AI Coding Updates and Guides | Qwen Code Docs"Durable /loop persists scheduled tasks to files, automatically recovering on next launch, with missed periodic tasks running one catch-up cycle."
