Continuous Mode
Fully autonomous task processing for duyetbot-action
Continuous Mode - Fully Autonomous Task Processing
Overview
Continuous mode enables duyetbot-action to process all available tasks autonomously without human intervention. The agent will:
- Pick the highest priority task from the queue
- Implement the solution
- Verify and create PR
- Auto-merge after CI checks pass
- Close the issue
- Move to the next task automatically
- Repeat until no more tasks
What It Does
The Autonomous Loop
Features
- Non-Stop Processing: Automatically picks up the next task after completing current one
- Configurable Limits: Set max tasks to process per session
- Delay Between Tasks: Optional pause to avoid overwhelming systems
- Auto-Close Issues: Automatically closes issues after successful PR merge
- Stop on Failure: Option to stop immediately if a task fails
- Progress Tracking: Shows task number and cumulative statistics
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
CONTINUOUS_MODE | Enable continuous mode | false |
CONTINUOUS_MAX_TASKS | Maximum tasks to process per session | 100 |
CONTINUOUS_DELAY_MS | Delay between tasks (milliseconds) | 5000 (5s) |
CLOSE_ISSUES_AFTER_MERGE | Close issues after PR merge | true |
STOP_ON_FIRST_FAILURE | Stop if a task fails | false |
Config Object
Usage
Command Line
Environment Variables
GitHub Actions Workflow
Output Example
Safety Features
Limits and Controls
- Max Tasks Limit: Prevents runaway processing (default: 100)
- Stop on First Failure: Option to halt on errors
- Delay Between Tasks: Prevents system overload
- Dry Run Support: Test continuous mode without making changes
Failure Handling
When a task fails:
- Error logged with full context
- Task marked as failed in source
- If
stopOnFirstFailure=true: processing stops immediately - If
stopOnFirstFailure=false: continues to next task
Verification Gates
- Local checks must pass before PR creation
- CI checks must pass before merge
- Any failure stops the current task (not the whole session)
Configuration Examples
Development Mode
Production Mode
Safe Mode (Dry Run)
Integration with Task Sources
GitHub Issues
TASKS.md File
Memory MCP
Tasks stored in memory are also processed by continuous mode.
Monitoring
Session Statistics
The continuous mode summary shows:
- Total tasks completed
- Total tokens used
- Average time per task
- Total session time
Per-Task Logging
Each task shows:
- Task number and title
- Source and priority
- Step-by-step progress
- Individual task statistics
Best Practices
- Start Small: Test with low
maxTasksfirst (e.g., 3-5) - Enable Dry Run: Use
--dry-runto test without making changes - Set Reasonable Delays: 5-10 seconds between tasks prevents rate limiting
- Monitor First Runs: Watch the first few runs to ensure smooth operation
- Configure Auto-Merge Carefully: Only enable in trusted environments
Troubleshooting
Agent stops after first task
Check CONTINUOUS_MAX_TASKS - ensure it's > 1
Tasks not being picked up
- Verify task source configuration
- Check for proper labels on GitHub issues
- Ensure TASKS.md has unchecked items
Issues not closing after merge
- Verify
CLOSE_ISSUES_AFTER_MERGE=true - Check
AUTO_MERGE=true(issues only close after merge) - Ensure token has
repowrite permissions
Rate limiting errors
Increase CONTINUOUS_DELAY_MS to 10-30 seconds
Future Enhancements
- Parallel task processing (multiple agents)
- Adaptive delays based on API rate limits
- Task prioritization by complexity
- Resume from checkpoint after interruption
- Integration with project management tools