Skip to main content

Task lifecycle

A task moves through a fixed set of statuses. Nexus Core is the only writer.

draft → planned → ready_for_agent → leased → running
→ waiting_review → (blocked) → done

From goal to tasks​

  1. A goal arrives (Telegram command or UI): "Build authentication system."
  2. Nexus drafts tasks from the goal (a planner agent or a built-in decomposer).
  3. Tasks land as draft/planned, with depends_on edges where ordering matters.
  4. The operator reviews the plan in the UI and approves. As deployed (2026-09-05): the goal itself is set approved by the worker once its description is judged specific enough — no human step — and its tasks are written directly as ready_for_agent (audit F8; the human-approval semantics are an open decision, see Goal lifecycle).
  5. Approved tasks flip to ready_for_agent and emit nexus.task.ready.
/nexus create goal "Build authentication system for my app"

→ Goal created.
→ Drafted 8 tasks.
→ Waiting for approval in Nexus UI.

From ready to running​

  1. The scheduler (in nexus-worker) picks a ready_for_agent task whose dependencies are satisfied.
  2. It leases the task (leased, with a lease that expires) so no other worker double-dispatches.
  3. Core assembles the run config and asks the runtime to start a run; the task flips to running. See Agent run.

From running to done​

  1. The pod reports completion events.
  2. If the task hit an approval gate or needs review, it becomes waiting_review; an operator resolves it.
  3. Otherwise the task becomes done. Blocked tasks (blocked) wait on an external dependency and are surfaced in the UI.

Statuses at a glance​

StatusSet byMeaning
draftdecomposerproposed, not yet planned
plannedoperator/plannerpart of an approved-pending plan
ready_for_agentoperator approvaldependencies clear, schedulable
leasedschedulerclaimed for a run (lease expires)
runningruntimea pod is executing
waiting_reviewCoreneeds human approval/review
blockedCore/agentwaiting on external dependency
doneCorecompleted