Skip to content

[FEATURE] Record how long each todo of a run took #1807

Description

@edenreich

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 TodoWrite changes its status - the model does not supply the times and cannot overwrite them
  • A todo that goes back from in_progress to pending and 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 TodoWrite behaves and reports exactly as today
  • docs/tools-reference.md describes the times next to the TodoWrite tool, 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

Activity

  1. added
    enhancement
    on Nov 11, 2026
  2. moved this from Todo to In progress in 2026on Nov 11, 2026
  3. moved this from In progress to QA in 2026on Nov 11, 2026
  4. inference-gateway-releaser commented on Nov 11, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.255.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  5. moved this from QA to Done in 2026on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions