Execution Model
The mission lifecycle, self-correction retries, and where costs accrue.
Lifecycle
Every unit of work is a mission moving through a fixed state machine
(MissionStatus, app/models/mission_models.py:74):
draft → pending → queued → running → completed | approved
↘ failed | paused | aborted | blocked
- queued → running: a worker picks the mission up; planning happens first
(a separate plan call,
MISSION_RATE_LIMIT_PLAN). - failed vs aborted: failed = the engine gave up (retries exhausted or unrecoverable error); aborted = you stopped it deliberately.
- paused is time-limited: after 7 days paused missions auto-fail and run
compensation (
MISSION_PAUSE_AUTO_FAIL_DAYS,expire_paused_missions.py).
Self-correction
Missions default to 3 retries of self-correction attempts
(MISSION_DEFAULT_MAX_RETRIES); each LLM request itself times out at 60 s
(MISSION_LLM_REQUEST_TIMEOUT). Retries are visible in execution traces so
you can see what the engine tried before surfacing a failure.
Costs
Costs accrue per LLM call during planning and execution, attributed through
the cost-attribution service (cost-attribution API group) — check the
dashboard endpoints under the same group for spend views.
Last updated 2026-08-25 (git-derived)