Repository navigation
Add CI watch script, API budget rules and /code-review note for agents - #1164
Draft
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Draft
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Conversation
scripts/ci-watch.sh turns a PR's CI into a quiet event stream meant for Claude Code's Monitor tool: a start summary, one line per failed check, progress counts, merge-queue position, and a final DONE line with an exit status (0 pass/merged, 1 fail/closed/dequeued). It reads checks through `gh pr checks`, which pages past the ~400-550 checks a PR here runs, and reports passes as counts so a monitor isn't flooded. AGENTS.md now tells agents to wait on CI with that script under Monitor rather than sleep/gh polling loops, and to run /code-review high (with --fix) before a PR leaves draft or enters the merge queue. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ci-watch.sh now reads only the PR's rollup state each poll (one small GraphQL query, every 2 minutes) and fetches the full check list, which is several pages for a PR here, only when that state changes or every 5th poll. A rate-limited poll pauses 10 minutes instead of retrying. AGENTS.md gains a "Share the GitHub API budget" section. Every agent and routine calls GitHub as one account, and on 2026-10-08 a bulk Actions fetch plus ~18 concurrent sessions ran the shared 5,000/hour quota to zero twice in one evening. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scripts/ci-watch.sh: a quiet event stream of a PR's CI, for Claude Code's Monitor tool (it also works in a terminal). It prints a start summary,fail: <check>for each failed check,progress:counts,queue:position changes, and a finalDONE ...line. Exit status is 0 for pass/merged and 1 for fail/closed/dequeued.--mergefollows the PR through the merge queue.AGENTS.md:sleep+gh pr checksloops or/loop./code-review high(and--fix) before a PR leaves draft or enters the merge queue. Use--commentwhen reviewing someone else's PR.x-ratelimit-remainingbefore bulk reads, cap pagination and parallelism, stop on rate-limit errors, and keep at most one re-check reminder per PR.Why
Every agent and routine calls GitHub as one account and shares one 5,000/hour budget. On 2026-10-08 a bulk Actions fetch by the new CI profiler, plus ~18 concurrent agent sessions, ran that budget to zero twice in one evening, and every agent stalled. The cloud routines' prompts got the same budget rules separately; this PR puts them where every agent reading this repo will see them.
Testing
shellcheckclean.DONE merged. Fix Poetry/PDM vendored re-vendor to superseding patch (#1136) #1137 (in the queue,--merge) printedqueue: entered at 1 awaiting_checks, then stayed silent.fail:paths: no PR had pending checks during testing.🤖 Generated with Claude Code