Todo Runner
Execute very large todo lists sequentially until completion using an external runner command (ideal for Agent SDK workers).
Todo Runner
Todo Runner is for long, finite workloads where a user gives a large checklist and expects continuous execution until all items are done (or explicitly blocked).
Use cases:
- migrating dozens of modules
- batch bug-fix backlogs
- large test-remediation lists
- iterative codebase cleanups
When To Use Todo Runner vs Schedules
- Use Todo Runner for one large checklist that should run to completion.
- Use Schedules for recurring time-based prompts.
Open Todo Runner
Go to Settings -> Todo Runner.
Each job includes:
- name
- working directory
- runner command
- global prompt
- todo items (one per line)
- runtime/progress status
Create A Job
- Click + Add Todo Run.
- Fill in:
- Name
- Directory
- Runner command (your Agent SDK worker entrypoint)
- Global prompt (applies to every item)
- Todo items (one per line)
- Click Save.
- Click Start.
Runtime Behavior
- Items run strictly in list order.
- One item is active at a time.
- Success marks item as done and advances.
- Failure retries up to 3 attempts per item.
- Failed retries use deterministic exponential cooldown (
15s,30s,60s, capped at5m). - Job card surfaces the next retry timestamp when an item is cooling down.
- Item hitting max attempts becomes blocked; job pauses.
- You can Pause, Start, or Reset Progress.
Runner Contract
Agent Observer executes your runner command in the job directory and passes context through both env vars and stdin JSON.
Environment Variables
AGENT_SPACE_TODO_PAYLOADAGENT_SPACE_TODO_TEXTAGENT_SPACE_TODO_INDEXAGENT_SPACE_TODO_TOTALAGENT_SPACE_TODO_PROMPTAGENT_SPACE_TODO_JOB_IDAGENT_SPACE_TODO_JOB_NAMEAGENT_SPACE_YOLO_MODE
Stdin JSON Shape
{
"job": {
"id": "todo-...",
"name": "Migration Batch",
"prompt": "Global instruction",
"workingDirectory": "/path/to/repo",
"yoloMode": false
},
"todo": {
"id": "item-...",
"text": "Migrate auth middleware in packages/api",
"index": 4,
"total": 30,
"attempts": 1,
"maxAttempts": 3
},
"todoItems": [
{ "id": "item-...", "text": "...", "status": "done", "index": 1 }
]
}Minimal Runner Expectations
Your runner should:
- read todo payload from env or stdin
- execute exactly one todo item per invocation
- exit with code
0on success - exit non-zero on failure with useful stderr
Todo Runner treats either non-zero exit or explicit error output as failure.
Validation Workflow
Before running a 100+ item list:
- Test with 2 items.
- Confirm progress increments correctly.
- Force one failure and verify retry behavior.
- Confirm blocked behavior after max retries.
- Reset and start full list.
Persistence And Resume
Todo job definitions and item states are persisted locally:
~/.agent-observer/todo-runner.json
If the app restarts, saved state is reloaded and unfinished work can be resumed.
Failure Recovery
Job stuck in error
- Inspect
Last erroron the job card. - Fix runner command or dependency issue.
- Click Start to continue from remaining items.
Wrong item execution behavior
- Verify runner consumes
todo.textfrom payload. - Ensure one-item-per-process contract is respected.
- Avoid internal loops that consume multiple items in one run.
Re-run from scratch
- Click Reset Progress.
- Confirm all items return to pending.
- Start again.
Next Step
For concrete Python/Node worker patterns and output contracts, see Agent SDK Runner Recipes.