Tasks

For work that spans many steps, many turns, or many agents, the agent creates structured tasks: persistent, dependency-aware units of work that outlive a single turn and are visible to every sub-agent working alongside it.

The agent manages tasks itself, using a small set of tools — task_create, task_update, task_list, task_get, task_output, and task_stop. You don't call these directly; you steer them through conversation and watch them play out in the feed, which shows task activity as rows as the agent works.

A task:

  • Survives across turns. It isn't cleared when the current exchange ends.
  • Is visible to sub-agents. A sub-agent the agent delegates to can see and update the same tasks.
  • Can carry dependencies. One task can wait on another before starting.
  • Can be shared across sessions or processes with the COMMAND_CODE_TASK_LIST_ID environment variable — point two separate agent runs at the same ID and they work off one shared task list, like a small team of agents dividing a single backlog.
Note

Tasks are model-driven, not a CLI feature. There's no dedicated command to create one by hand — the agent decides to create, update, or complete tasks as part of doing the work, and you see the result in the feed.

These look similar and are not the same thing.

Tasks/todos
ScopePersistent, cross-turn, cross-sessionLightweight, single-session checklist
VisibilityFeed rows; shared with sub-agentsPinned above the input, in-session only
StructureDependencies between tasksFlat list
SharingShared across processes via COMMAND_CODE_TASK_LIST_IDNot shared
Who drives itThe agent (task tools)The agent (todo_write), you manage the list in the UI
Note

/todos is a session checklist for keeping a running plan in view — press x to remove an item, c to mark one completed, or a to mark the whole plan done (which clears the list). Tasks are the underlying engine for durable, shareable, multi-agent work. Reach for the mental model "todos are what I see this session; tasks are what survives and scales beyond it."

  • Long multi-step work — a task list keeps the plan intact even as the conversation grows.
  • Parallel sub-agents dividing work — each sub-agent picks up tasks from the same shared list instead of duplicating effort.
  • Follow-ups discovered mid-run — the agent can add a task for something it noticed without derailing the current step.