ServicesTask Service
Execution and Validation Flow
runTaskNow stages, live progress snapshots, and final status rules
Execution and Validation Flow
End-to-end flow
- load task definition and create run directory
- write
input.mdandrun-progress.json(running) - execute by
kind:script: execute script body directlyagent: single-round by default; executor + user-simulator multi-round flow only whenreview: true
- validate result (current rule: output must be at least 1 char)
- write
output.md/result.md/run.json/dialogue.*/error.md
Manual vs Scheduled Trigger
- manual trigger: Console UI calls
/api/dashboard/tasks/run - manual trigger is currently async acceptance: the API returns
accepted=true, a guidancemessage, andexecutionIdfirst, then the run continues in background - scheduled trigger: task scheduler starts runs from cron or one-shot time rules
- scheduler has same-
taskIdserialization; manual trigger currently does not have the same anti-reentry protection
Why Multiple Run Records Appear
- every execution creates a new timestamp directory
- Console UI lists runs by scanning these timestamp directories
- so one accepted run request becomes one run record; two accepted requests become two records
Artifacts and Responsibilities
input.md: execution input snapshotrun-progress.json: in-progress status and phase updatesoutput.md: final task output bodyresult.md: human-readable summarydialogue.md/dialogue.json: multi-round agent revision trailrun.json: final metadata and statuserror.md: failure summary when execution fails
Result fields
status: final status (success/failure)executionStatus: execution-stage statusresultStatus: validation status (valid/invalid/not_checked)executionId: unique execution id