Skip to content

feat: predicted run duration from historical task timings #686

Description

@nam-hle

Split out from the #370 "Ideas" parking lot (Task estimation).

Idea

Estimate how long a requested task graph will take before / during a run, using timing data recorded from previous runs.

Motivation

Nadle already records per-task durations (the profiling summary, critical-path, and cache-miss hotspots in --summary prove timing data is captured). That data could feed a forward estimate so a user knows roughly what they are about to wait for.

Possible shape (to refine)

  • Persist per-task duration history alongside the cache (e.g. a rolling average per task id).
  • Before a run, sum the estimated durations across the resolved DAG (respecting parallelism / worker count) to produce a total estimate.
  • Surface it: e.g. a line at run start, and/or in --dry-run.
  • Tasks predicted to hit cache contribute ~0; only cache-miss tasks add to the estimate.

Open questions

  • Where to store history (cache dir? separate file?) and how much to keep.
  • How to handle first-ever runs (no history) — omit the estimate vs show "unknown".
  • Interaction with --parallel / worker count for a realistic wall-clock estimate.

Notes

  • Spec-first per CLAUDE.md if this changes observable behavior/output.
  • Relates to existing profiling output (--summary).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    benefit: mediumImproves safety, maintainability, or developer experienceeffort: medium1-4 hours, multiple files or moderate complexitypriority: lowMinor impact, few users, non‑urgenttype: featureNew feature or request enhancement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions