OpenProgram Docs

Task store

A task is one list and a step is one todo, kept per conversation in todos.json. Task blocks draw from it.

Task
T3: title, purpose, open, done or displaced, outcome, whether it ever advanced, the Goal it was started under
Step
A todo whose plan is the task's id: pending, in progress, completed or dropped, with a half-sentence result
Segment
One per reply and task: the task and all its steps as that reply last left them

Board

ItemRule
One board per branchTasks, steps and segments. A branch made by a retry, an edit or a fork starts from a copy of the board it left from, so two branches never overwrite each other.
One open task per agentStarting a task closes the open one. A sub-agent's tasks are its own (scope agent:<id>).
IdsA task is T<n>, counted per board. A step keeps its todo id; the model names steps by their place in the task, 1 for the first.
Dropped stepNot counted in progress and no Goal requirement. Still listed to the Goal's verifier.
Sub-agent without a taskTicks a step of the conversation's open task; the parent's latest segment is updated

Segment

FieldHolds
anchor_id, plan_idThe reply and the task. A later change in the same reply replaces the segment; a change in a later reply adds one, so earlier replies keep the task as they left it.
staterunning, done, carried (open, continued in a later turn) or displaced (another task took its place). A stop or a failure is not stored: the reply's status tells.
currentThe step in progress at the last change; kept after a stop
earlierSteps already finished when the segment began: the "earlier steps done" row
advancedWhether a step call ever moved the task on
todosEvery step: id, subject, status, result
title, purpose, outcome, started_at, ended_atWhat the header shows

500 segments are kept per branch; the oldest drop off.

Sent to the interface

FrameCarries
todos_updatechanged: the segments a call or the end of a turn changed. A client replaces its copy of each by reply and task.
session_loadedtodo_plans: every branch's segments
goal_updateprogress: the Goal's latest task, the step in progress, steps done and counted, the reply holding its latest block
Blocks and text framestask and step on each text, thinking and tool block

Stored before tasks

EntryRead as
Segment without titleA plain todo list, read as stored. The chat joins the entries of one agent under a reply into one list and draws it once, folded.
Todo in no taskKept on the board; it still counts for the Goal it was created under
File with a single boardBelongs to the branch selected when it is first read

Why

DecisionReason
The todo store is kept under tasksGoal acceptance, the Goal's checklist and a sub-agent ticking its parent's step already read todos. A task adds a name and a state on top; none of them changes.
A segment per replyA reply read later shows the task as that reply left it, and a task spanning turns is drawn in each turn's own part
Only changed segments are sentA long Goal holds hundreds; a reconnect reloads them all
Stop is not a stored stateThe reply already says how it ended; a second copy could disagree
Code
  • openprogram/programs/tools/planning/todo/shared.py (place_segment, close_at_turn_end, turn_owner, publish)
  • openprogram/programs/tools/planning/todo/task_start/task_start.py, task_step/task_step.py
  • openprogram/programs/tools/planning/goal/chat.py (progress)
  • apps/web/lib/chat/transcript/task-blocks.ts (normalizeSegments, tasksByRow, oneListPerAgent)

Task blocks

Last updated · 2026-11-25