How I built session checklists in my AI assistant: plans the agent can't quietly rewrite
Description and use
Implemented a checklist system for an AI assistant that prevents silent task deletion and reordering, ensures transparent task completion, and preserves state across sessions.
Problem
Long AI assistant sessions cause the model to forget the plan, leading to incomplete or incorrect task execution.
Outcome
The checklist system prevents the assistant from silently deleting or reordering tasks, reduces multi‑round error corrections to single‑round fixes, and preserves plan state across restarts and legacy threads.
Workflow
- 1. Define write_todos tool to create a checklist with stable IDs and status enum.
- 2. Enforce validation rules: no removal, no reordering, status changes only via updates.
- 3. Store checklist in session file and restore on thread reload.
- 4. Inject current checklist into system prompt each turn with a directive to mark only completed tasks as completed.
- 5. Provide detailed error messages that include current valid state to aid model correction.
- 6. Render checklist in UI for live visibility.
- 7. Reconstruct old plans via todoProgress() for backward compatibility.
Evidence
The problem with long sessions is simple: the model forgets the plan. It starts three things, finishes one, and cheerfully reports that everything is done.
The tool is deliberately strict ... Existing items can never be replaced or removed.
Before your final reply, use write_todos to mark work actually completed as completed. Leave unfinished work pending or in_progress; do not mark it completed without evidence.
An earlier trace showed the model wasting five write_todos rounds fighting the validation — bad ID, reorder attempt, removal attempt — because each error just said "no".
Checklists are saved with the session file and restored when the thread reloads.
- Record date: 2026-10-02T11:55:52.263Z