Lead Time#
Lead time is the total elapsed time from issue creation to closure. It includes time in backlog, waiting for prioritization, blocked by dependencies, in active development, in review, and waiting for release.
Definition#
lead_time = issue.closed_at - issue.created_atStart signal: issue-created -- the timestamp when the GitHub issue was opened.
End signal: issue-closed -- the timestamp when the issue was closed (by any means: a merged PR, manual close, or bot).
Lead time is always measured on issues, regardless of cycle_time.strategy.
What it tells you#
A long lead time does not necessarily mean slow development -- it often means slow prioritization or long backlog queues. An issue in "Backlog" for 60 days that takes 2 days to implement has a 62-day lead time but only a 2-day cycle time.
A large gap between lead time and cycle time indicates process bottlenecks outside development.
Signals used#
| Signal | Source | Description |
|---|---|---|
issue-created | issue.created_at | GitHub issue creation timestamp |
issue-closed | issue.closed_at | GitHub issue closure timestamp |
Both timestamps come from the GitHub REST Search API and are precise to the second.
Open issues#
If an issue is still open (closed_at is null), lead time has a start event but no end event or duration. JSON output: lead_time_seconds is null. Pretty output: "N/A".
Statistical aggregation#
When computed across multiple issues (e.g., in a release report):
- Count: Number of issues with a valid lead time
- Mean: Average lead time
- Median: Middle value (less sensitive to outliers than mean)
- Std Dev: Sample standard deviation (requires 2+ data points)
- P90 / P95: 90th and 95th percentile (requires 5+ data points)
- Outlier cutoff: Q3 + 1.5 * IQR (requires 4+ data points)
- Outlier count: Issues exceeding the cutoff
Negative durations are filtered from statistics and counted separately.
Configuration that affects lead time#
Lead time requires no configuration -- it uses only the issue's creation and closure timestamps. Other config fields affect which issues are included:
| Config field | Effect |
|---|---|
scope.query | Filters which issues are analyzed |
quality.categories | Classifies issues but does not change lead time values |
exclude_users | Excludes issues authored by specified users |
lifecycle.done.query | Determines which issues qualify as "done" for bulk queries |
Example output#
Pretty format#
Lead Time
Start: issue-created 2026-01-15T10:30:00Z
End: issue-closed 2026-02-02T14:15:00Z
Duration: 18d 3h 45mJSON format#
{
"lead_time": {
"start": {
"time": "2026-01-15T10:30:00Z",
"signal": "issue-created"
},
"end": {
"time": "2026-02-02T14:15:00Z",
"signal": "issue-closed"
},
"duration_seconds": 1567500
}
}Aggregate statistics (release report)#
{
"aggregates": {
"lead_time": {
"count": 17,
"mean_seconds": 24271200,
"median_seconds": 5248800,
"stddev_seconds": 43981056,
"p90_seconds": 134236800,
"p95_seconds": 138499200,
"outlier_cutoff_seconds": 119448000,
"outlier_count": 2
}
}
}Commands that report lead time#
gh velocity flow lead-time <issue>-- single-issue lead timegh velocity quality release <tag>-- per-issue and aggregate lead time within a releasegh velocity report-- aggregate lead time across a time window
Insights#
Automated observations generated in the lead time section:
| Insight | When it fires | What it means |
|---|---|---|
| Noise detection | 3+ issues closed in under 60 seconds | Spam, duplicates, or bot closures are distorting metrics. Regenerate config with preflight --write to auto-exclude noise labels. |
| Low median | Median under 1 hour with 10+ items (and no noise detected) | Similar to noise detection but subtler — fast closures are pulling the median down. |
| Outlier detection | 2+ items exceed the IQR-based cutoff | A few slow items are much longer than typical. Often old issues finally closed alongside recent work. |
| Predictability | CV > 0.5 | Delivery times vary significantly. CV > 1.0 means the median is a more reliable estimate than the mean. |
| Skew warning | Mean > 3x median | The distribution is right-skewed — a few very slow items inflate the average. |
| Extreme median | Median exceeds 1 year | Likely a backlog cleanup rather than normal delivery. Consider narrowing the time window. |
| Fastest/slowest | 3+ items | Links to the fastest and slowest issues for quick investigation. |
| Category comparison | 2+ categories with data | Compares median duration across categories (e.g., bugs vs features). |
See also#
- Understanding Statistics -- median, percentiles, and outlier detection
- Cycle Time -- the active-work subset of lead time
- Configuration Reference -- config fields that affect which issues are included