review-runs runs daily on a cron and opens its window with now - 24h, evaluated when the agent runs the command rather than when the run started (SKILL.md:133):
SINCE=$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)
That timestamp is the run's start plus container boot and skill loading. The predecessor started at its cron time, earlier by whatever drift it saw. So the window opens strictly after the predecessor started, and everything in the gap is dropped. The gap is startup_latency + predecessor_drift — it is never zero and never negative, so this is a systematic under-count rather than a coin flip. Step 2 clips the same band independently, because token-report.sh 24 measures 24 hours back from its own invocation (SKILL.md:178).
This is adjacent to but distinct from #886 and #888. Those decide how much of the window is visible; this decides where the window starts. A fully paginated census of a window that opens too late still misses these runs, and unlike a dropped page there is no second listing that recovers them — Step 2 is the fallback that rescued the truncated runs in #888, and it has the same defect here.
Measured on max-sixty/cargo-affected, 2026-08-10
Predecessor 31302553802 started 08:02:16Z. This run (31369370104) started 08:16:49Z, and its first now - 24h resolved to 08:18:19Z — a 16m03s band:
$ gh api --paginate "repos/max-sixty/cargo-affected/actions/runs?created=2026-08-09T08:02:16Z..2026-08-09T08:18:19Z&per_page=100" \
--jq '.workflow_runs[] | "\(.created_at) \(.name) \(.id)"'
2026-08-09T08:02:16Z tend-review-runs 31302553802
2026-08-09T08:11:23Z tend-notifications 31302916234
2026-08-09T08:13:12Z tend-review 31302992086
2026-08-09T08:13:13Z ci 31302992935
2026-08-09T08:16:01Z tend-mention 31303110028
2026-08-09T08:18:07Z tend-mention 31303189879
2026-08-09T08:18:13Z tend-mention 31303194553
Two of those seven are full agent sessions, and both were load-bearing for that day's audit:
| Run |
Workflow |
Cost |
Why it mattered |
| 31302992086 |
tend-review |
$1.57 |
found two defects in the predecessor's own proposed recipes, which the predecessor then fixed |
| 31303194553 |
tend-mention |
$1.40 |
duplicated the predecessor's fix work end to end (the #865 shape, with review-runs as the long-lived session instead of nightly) |
The band also grows during the session, because each date call moves now forward: a later date -u -d '24 hours ago' in this same run resolved to 08:23:54Z, by which point 15 runs sat in the gap. So two steps of the same audit can disagree about the window, and the later step sees less.
Because the window slides forward by roughly the startup latency every day, the loss compounds in a specific way: whatever happens in the minutes right after a review-runs run starts is exactly the work that run triggers (its own PR getting reviewed, a mention firing on that review), and that is precisely the band the next run cannot see.
Prior recordings
This repo's evidence log recorded the symptom three times before measuring it — 2026-08-03, 2026-08-05 and 2026-08-09 — each time as "the audit misses its own predecessor", suppressed as near-zero impact on the reasoning that the predecessor's outputs (a tracker comment, a PR) are readable directly anyway. That reasoning holds for the predecessor and does not extend to the other runs in the band, which is what this run measured.
Proposed fix
Anchor SINCE on the predecessor's created_at, with a duration fallback for the first run on a fresh repo:
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
WF_ID=$(gh api "repos/$REPO/actions/runs/$GITHUB_RUN_ID" --jq '.workflow_id')
PREV_START=$(gh api "repos/$REPO/actions/workflows/$WF_ID/runs?status=completed&per_page=10" \
--jq "[.workflow_runs[] | select(.id != $GITHUB_RUN_ID) | .created_at] | max // empty")
SINCE=${PREV_START:-$(date -u -d '25 hours ago' +%Y-%m-%dT%H:%M:%SZ)}
Excluding $GITHUB_RUN_ID matters: a re-run attempt of the current run can surface as completed, and anchoring on itself would collapse the window to zero.
Step 2 takes whole hours, so derive them from the same anchor instead of the literal 24:
HOURS=$(( ( $(date -u +%s) - $(date -u -d "$SINCE" +%s) + 3599 ) / 3600 ))
"${CLAUDE_PLUGIN_ROOT}/scripts/token-report.sh" "$HOURS" > /tmp/token-report.json
Both forms were executed live during this run — the anchored query returned 2026-08-09T08:02:16Z and HOURS=25 (deriving the workflow id from $GITHUB_RUN_ID rather than assuming the filename matches $GITHUB_WORKFLOW), and the empty-list branch fell through to the 25 hours ago default correctly. A short overlap between consecutive windows is the cost; it is cheap, and the dedup in Step 5 already handles a finding being seen twice.
review-reviewers runs on a much shorter cadence, so if its window is computed the same way the margin is proportionally tighter — worth checking as part of the same fix. I have not measured it; this repo does not run that workflow.
Gate assessment
Filed directly under the standing agent-equipped-target exception in this repo's running-tend overlay. A repo-local overlay carrying the same rule is in max-sixty/cargo-affected#80 — that repo pins 0.1.14, which predates even #886, so it needs the bridge regardless of what lands here.
review-runsruns daily on a cron and opens its window withnow - 24h, evaluated when the agent runs the command rather than when the run started (SKILL.md:133):SINCE=$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)That timestamp is the run's start plus container boot and skill loading. The predecessor started at its cron time, earlier by whatever drift it saw. So the window opens strictly after the predecessor started, and everything in the gap is dropped. The gap is
startup_latency + predecessor_drift— it is never zero and never negative, so this is a systematic under-count rather than a coin flip. Step 2 clips the same band independently, becausetoken-report.sh 24measures 24 hours back from its own invocation (SKILL.md:178).This is adjacent to but distinct from #886 and #888. Those decide how much of the window is visible; this decides where the window starts. A fully paginated census of a window that opens too late still misses these runs, and unlike a dropped page there is no second listing that recovers them — Step 2 is the fallback that rescued the truncated runs in #888, and it has the same defect here.
Measured on
max-sixty/cargo-affected, 2026-08-10Predecessor 31302553802 started
08:02:16Z. This run (31369370104) started08:16:49Z, and its firstnow - 24hresolved to08:18:19Z— a 16m03s band:Two of those seven are full agent sessions, and both were load-bearing for that day's audit:
tend-reviewtend-mentionreview-runsas the long-lived session instead of nightly)The band also grows during the session, because each
datecall movesnowforward: a laterdate -u -d '24 hours ago'in this same run resolved to08:23:54Z, by which point 15 runs sat in the gap. So two steps of the same audit can disagree about the window, and the later step sees less.Because the window slides forward by roughly the startup latency every day, the loss compounds in a specific way: whatever happens in the minutes right after a
review-runsrun starts is exactly the work that run triggers (its own PR getting reviewed, a mention firing on that review), and that is precisely the band the next run cannot see.Prior recordings
This repo's evidence log recorded the symptom three times before measuring it — 2026-08-03, 2026-08-05 and 2026-08-09 — each time as "the audit misses its own predecessor", suppressed as near-zero impact on the reasoning that the predecessor's outputs (a tracker comment, a PR) are readable directly anyway. That reasoning holds for the predecessor and does not extend to the other runs in the band, which is what this run measured.
Proposed fix
Anchor
SINCEon the predecessor'screated_at, with a duration fallback for the first run on a fresh repo:Excluding
$GITHUB_RUN_IDmatters: a re-run attempt of the current run can surface ascompleted, and anchoring on itself would collapse the window to zero.Step 2 takes whole hours, so derive them from the same anchor instead of the literal
24:Both forms were executed live during this run — the anchored query returned
2026-08-09T08:02:16ZandHOURS=25(deriving the workflow id from$GITHUB_RUN_IDrather than assuming the filename matches$GITHUB_WORKFLOW), and the empty-list branch fell through to the25 hours agodefault correctly. A short overlap between consecutive windows is the cost; it is cheap, and the dedup in Step 5 already handles a finding being seen twice.review-reviewersruns on a much shorter cadence, so if its window is computed the same way the margin is proportionally tighter — worth checking as part of the same fix. I have not measured it; this repo does not run that workflow.Gate assessment
SINCEexpression and a derivedHOURS, in the two places that already compute them. No new sections.token-report.sh's--limit 100and Step 1'sstartswith("tend-")prefix; fix(list-recent-runs): recover the window on the last successful run, and stop the fetch limit re-truncating it #838/fix(list-recent-runs): close the completion window at the cron tick #850 arelist-recent-runs.sh. None touches where the window opens.Filed directly under the standing agent-equipped-target exception in this repo's
running-tendoverlay. A repo-local overlay carrying the same rule is in max-sixty/cargo-affected#80 — that repo pins0.1.14, which predates even #886, so it needs the bridge regardless of what lands here.