Expand description
The todo_write tool — the model-facing write path onto a session’s
per-agent checklist (#8235).
Why: the roster’s todos field (DOC-39 §5.4, session::registry_agents)
was reserved and always empty because nothing could write it, so a
multi-step task had no in-flight plan anywhere. The #8235 parity capture
is the cost: asked for a flag, a test and a changelog line, the agent
landed the flag and went idle with the other two silently dropped. Goal
slots (tools::goals) are not that mechanism — five fixed slots, no
per-step state, and their own description tells the model they are “NOT a
todo list”.
What: TodoWriteTool validates the model’s whole-list argument and hands
it to a TodoStore. The store trait lives HERE, in the tools layer, and
task::todo_store::SessionTodoStore implements it — the same layering
agent_loop::sink::ToolEventSink uses, so tools never depends upward on
session/task. Registered on the daemon-session registry only
(task::executor::run_and_record), exactly like set_goal/clear_goal.
Whole-list replace, not a patch. #8235’s own closure condition names
“a whole-list-replace call”, and the token arithmetic agrees: a patch
protocol needs stable per-item ids the model must carry across
compaction, plus a companion read tool to recover them after a reset —
two calls and a stale-id failure mode to save a handful of tokens on a
list that is rarely longer than ten short lines.
Test: tests::* (this file’s sibling checklist_tests.rs) for schema,
validation and store dispatch; task::todo_store::tests::* for the
round trip out through session.get_agents.
Structs§
- Todo
Write Tool ToolExecutorfortodo_write(#8235).
Enums§
- Todo
Error - Why a
todo_writecall was refused (#8235).
Constants§
- MAX_
TODOS - Hard ceiling on a single checklist’s length.
- TODO_
WRITE_ TOOL_ NAME - The
todo_writetool’s registered/advertised name.
Traits§
- Todo
Store - Where a validated checklist is written (#8235).