Repository navigation
Description
Summary
Record how long each todo of a run took, so a long run shows where the agent spent its time.
An agent that plans with TodoWrite already tells the user what it is doing: the list shows each item as pending, in progress or done. It does not say how long any of them took. On a long run that is the question that matters. A drone footage edit on a workspace computer (inference-gateway/desktop#535) ran for about 20 minutes over nine todos - unpack the tools, score the motion, stabilise, build the edit, grade, sound effects, music, four exports, deliver. Finding out that stabilising took 4.5 minutes and each export 3 meant reading timestamps off files on the pod by hand. The run total (time: 14m 27s in the desktop's status bar) is the only duration a client gets.
The CLI is the one place that sees every status change of a todo, so it should stamp them: when an item first becomes in_progress and when it becomes completed. From those it can report the time each todo took, in the todo state every client already renders, and a summary when the run ends.
Acceptance Criteria
- Each todo carries when it was started and when it was completed, stamped by the CLI when
TodoWritechanges its status - the model does not supply the times and cannot overwrite them - A todo that goes back from
in_progresstopendingand is started again adds up the time of every stretch it was in progress - The todo state a headless run publishes over AG-UI carries the elapsed time of each item, a running one included, so a client can show it without computing it
- The TUI's todo list shows the time beside each completed item and a running time beside the one in progress
- When a run ends, its result reports the time per todo and the time spent with no todo in progress, and the parts add up to the run's total
- The times survive a restart of the worker: a resumed session shows the times of the todos it had already finished
- A run that never calls
TodoWritebehaves and reports exactly as today -
docs/tools-reference.mddescribes the times next to theTodoWritetool, and the AG-UI state docs name the new fields - Tests cover the stamping, a todo that is reopened, the published state and the end-of-run summary
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
inference-gateway-releaser commentedon Nov 11, 2026
🎉 This issue has been resolved in version 0.255.0 🎉
The release is available on:
Your semantic-release bot 📦🚀