Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I built session checklists in my AI assistant: plans the agent can't quietly rewrite

说明与用途

为AI助手实现了检查表系统,防止任务被悄悄删除或重新排序,确保任务完成透明化,并在会话间保持状态。

问题

Long AI assistant sessions cause the model to forget the plan, leading to incomplete or incorrect task execution.

结果

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.

工作流

  • 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.

证据

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.

来源

  • 记录日期: 2026-10-02T11:55:52.263Z