You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rtk gh pr checks <PR> --watch reports check counts inflated by a multiple of the real total (e.g. 18 reported instead of 9) when the PR's checks have already finished by the time --watch starts polling.
Root cause
gh pr checks --watch, when stdout is not a TTY (piped/captured — the normal case for an agent-driven shell), does not clear the screen between polls. It just appends the full checks table again on every polling cycle until it detects the run is complete. If the checks are already resolved, gh still does at least one extra poll cycle before exiting, so the raw output contains the same 9-row table printed 2+ times.
rtk's filtered summary for --watch appears to count pass/fail occurrences across the entire captured output stream instead of deduplicating by check name / using only the final snapshot, so N poll cycles × real check count gets reported as the total.
Reproduction
# Raw gh output — same table printed twice within one --watch invocation
gh pr checks 9776 --watch
# (9-row table, then the same 9-row table again ~10s later, 18 lines of "pass" total)# rtk filtered mode, same PR
rtk gh pr checks 9776 --watch
# CI Checks Summary:# [ok] Passed: 18 <- real total is 9# [FAIL] Failed: 0# Without --watch, rtk is correct on the same PR:
rtk gh pr checks 9776
# CI Checks Summary:# [ok] Passed: 9# [FAIL] Failed: 0
Environment
rtk 0.45.0 (also reproduced on 0.37.2 before upgrading — not fixed by the upgrade)
gh version: 2.97.0 (2026-07-31)
macOS, invoked via Claude Code's Bash tool (non-TTY stdout)
Impact
An agent relying on rtk gh pr checks --watch's summary to decide whether CI passed gets a plausible-looking but wrong number. In this case it wasn't misleading (18/18 still reads as "all passed, 0 failed"), but the count itself is fabricated and would misrepresent partial-failure states too if, say, 1 of 9 real checks failed but got counted twice as failed among 18 — the ratio would still look coherent but wouldn't match GitHub's actual check count.
Suggested fix
For --watch, either:
parse only the last complete table snapshot in the captured output before summarizing, or
deduplicate by check name (keep the most recent status per name) before counting.
rtk's --watch summary for gh pr checks sums pass/fail across all polling cycles instead of deduplicating by check name, inflating counts (and could mask real partial failures); fix by parsing only the final snapshot or deduping per check name.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/commands/gh/pr_checks.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
Activity
pszymkowiak commentedon Aug 11, 2026
🔍 Automated Triage
bughighSummary
rtk's --watch summary for
gh pr checkssums pass/fail across all polling cycles instead of deduplicating by check name, inflating counts (and could mask real partial failures); fix by parsing only the final snapshot or deduping per check name.📁 Relevant files
src/commands/gh/pr_checks.rsTriaged automatically by wshm · This is an automated analysis, not a human review.