Repository navigation
Description
This was generated by AI during triage.
Scheduled thirdshift passes continue making GitHub requests while the account's GraphQL quota is exhausted, producing repeated failures, including a misleadingly broad review failed notification before an Architecture review starts. Add quota-aware deferral and reduce avoidable GitHub reads from idle polling.
Confirmed operational evidence
The deployment was inspected over SSH on October 16, 2026. Its scheduler log, ~/.thirdshift/logs/cron.log, contains:
- 126 quota-error lines between 2026-10-17 02:04:23 and 02:10:22 UTC, corresponding to October 16, 10:04:23–10:10:22 p.m. EDT. These are logged failures, not a measurement of total requests or points consumed.
- At 02:09:21 UTC, seven scheduled Architect runs started; at 02:09:22, all seven logged the same
gh issue listquota failure. This matches the reported 10:09 p.m. notification. - Successful GitHub reads resumed by 02:11 UTC. This establishes API recovery, not that the failed Architecture review subsequently ran or succeeded.
- The crontab schedules 15 jobs every minute across seven repositories: seven Pickup runs, seven Architect runs, and one Security run. Requests continued throughout the exhausted window.
- A later server-side
gh api rate_limitsnapshot showed GraphQL 4,792 / 5,000 points remaining. It is a later snapshot, not the failed request's reset metadata.
Representative error, with the account identifier redacted:
thirdshift: 02:09:22 gh issue list failed: GraphQL: API rate limit already exceeded for user ID <REDACTED>.
The reported notification included:
Result: review failed
Review: failed
Cause: gh issue list failed: GraphQL: API rate limit already exceeded for user ID <REDACTED>.
Built with codex · gpt-6.1-sol · high (configured)
Took: 0s
This error identifies GitHub GraphQL exhaustion. The configured model line does not establish a model request ran or failed, and this notification supplies no evidence of an OpenAI subscription or API-credit limit.
At inspection, the installed binary reported thirdshift 0.11.2, and the deployment checkout was at 30424e6da199e6bbcd85d5acf8740c1cba7caf08. These identify the inspected environment; the binary's source revision was not independently verified.
Relevant implementation and prior checks
The inspected GitHub adapter lists labelled issues through gh issue list --limit 1000; gh_json propagates a nonzero command result immediately as gh issue list failed: .... A search of src/ and tests/ found no explicit GitHub quota/cooldown implementation. See the inspected GitHub adapter.
Searches of existing issues for rate limits, GitHub quota, GraphQL, backoff, and polling found no matching quota-deferral issue. No .out-of-scope/ rejection directory was present in the inspected checkout.
Preserve ADR 0009's scheduler ownership: each pass remains a short-lived command started by the operating system. Coordinate reporting with ADR 0011's Activity log.
Proposed behavior for maintainer triage
- Recognize GitHub primary quota exhaustion and defer further affected scheduled requests until the reported reset time. Avoid immediate or minute-by-minute retries during a known exhausted window.
- Make the cooldown effective across successive cron invocations and repositories using the same GitHub quota on one machine, with appropriate isolation between different credentials/accounts.
- Report that GitHub quota prevented the pass from starting its review or work. A deferred pass must never be represented as a successful review, successful GitHub read, or empty work queue. Avoid repeated failure notifications for the same known cooldown window.
- Let later scheduled passes resume normal selection after reset; preserve existing Ready issue, Claim, and Pass rules.
- Reduce avoidable idle polling, through a documented scheduling recommendation and/or a measured reduction in GitHub reads. Do not silently change the user's crontab.
GitHub documents a normal user GraphQL allowance of 5,000 points per hour, shared by requests on the user's behalf. For primary exhaustion it instructs clients to wait until x-ratelimit-reset. See GitHub's rate-limit documentation.
Suggested validation and open decisions
Use a controlled fake GitHub response and clock rather than exhausting a real account. Verify that repeated scheduled invocations, including another repository sharing the same quota, do not repeat affected requests before reset; a later pass can resume after reset; unrelated failures still surface correctly; and deferral never claims review success. Measure idle read volume across a representative multi-repository schedule.
Maintainer decisions remain: the deferred outcome/exit status, notification policy, safe handling when reset metadata is unavailable, and a conservative default scheduling recommendation. This is filed as enhancement / needs-triage, not an agent-ready implementation brief.
The exact client or combination of clients that consumed the original quota is unknown. The schedule is confirmed load and the repeated attempts are confirmed behavior; neither proves thirdshift alone exhausted the account. No controlled code-level reproduction or implementation change was performed, and no server settings were changed during investigation.
Activity
JacobStephens2 commentedon Oct 17, 2026
Additional Security run evidence
The same quota-exhaustion window affected the Security run on
JacobStephens2/thirdshift, hoststephens. The scheduler log records it starting at 2026-10-17 02:09:11 UTC (October 16, 10:09:11 p.m. EDT), followed at 02:09:12 by:The reported notification said
Result: audit failed,Audit: audit failed, a configured Codex model, andTook: 0s, with no cause or log pointer. Surrounding matching emails were retrieved; the scheduler log establishes the exact 02:09 event. Source inspection places the failing Ready issue query before audit/session startup, so this is evidence of a GitHub gate failure, not a model failure or discovered vulnerability.#740 now owns truthful pre-audit status, a safe operational cause and a diagnostic route in the Security run's notification. This issue remains the home for cooldowns across scheduled passes, avoidable idle reads and repeated-alert policy; it stays
enhancement/needs-triagewith the existing policy decisions open. No duplicate quota-recovery issue was created, and no scheduler settings were changed.JacobStephens2 commentedon Oct 25, 2026
Carried over from #1186 (closed as a duplicate): besides fewer requests, the ceiling can be raised. GitHub App installation tokens get their own rate limit, separate from the user's 5000/hr, and an Enterprise plan raises the limit.
JacobStephens2 commentedon Nov 10, 2026
Investigation of existing #739 against selected Base main at 02c9654 confirms remaining work, with some original source observations now outdated. Recommend Day shift shaping before implementation.
Evidence:
GitHub requires waiting until reset after primary exhaustion; GraphQL errors can arrive with HTTP 200, while REST exhaustion uses 403/429. See GraphQL limits and REST limits.
Proposed shaping: shared primary-quota cooldown state; Pass integration with truthful outcomes and repeated-alert policy; and measured idle-read reduction with scheduling guidance. Preserve ADR 0009's short-lived OS-scheduled Passes, ADR 0011's Activity log behavior, and existing Ready issue, Claim and reservation rules. Do not edit crontabs automatically.
Validation should use fake GitHub responses and controlled time: repeated and concurrent invocations across repositories sharing a quota, independent quota owners/resources, reset recovery, missing metadata, unrelated failures, and truthful deferral without treating failed reads as empty queues or successful reviews. Keep mutation completion and Claim cleanup safe. Current tests establish existing behavior, not an end-to-end shared cooldown.
Questionnaire
For the Day shift shaping #739: the repository confirms that Pass-wide cooldowns remain absent, while Inbox quota protection and Security pre-audit reporting already exist. These decisions are needed before agent implementation.
JacobStephens2 commentedon Nov 10, 2026
New evidence: a Ticket run lost at CI watching (#1968), and the fleet's scheduled load
Failure. On 2026-11-10 at 20:02:15 UTC, the Pickup run of #1968 on host
orchestratestopped at CI watching after 1h 6m. The cause wasgh api repos/JacobStephens2/thirdshift/actions/runs?head_sha=…failing withAPI rate limit exceeded for user ID 53905376 (HTTP 403). Work is preserved onissue-1968/ PR #1970, but the run endedfailedand needs a manual Continuation. This is a costlier failure mode than an idle Pass failing: an hour of a run's progress stopped on a transient quota error that would have cleared at the reset (15:12 EST, about 70 minutes later). The REST core quota was at 0/5000 when checked; GraphQL still had 4687 left.Shared quota. Six hosts run scheduled Passes, and all authenticate as the same GitHub user (
gh api graphql viewerreturned the same user on each): Lima VM, orchestrate, dev, stephens.page, thirdshift.app and test. All share one 5000/hr REST quota. (preview, replay and etadventures-kinsta have no authenticatedgh; the Mac's Pickup LaunchAgent is not loaded.) Each of the six hosts also runs a Console.Scheduled Pass starts per hour, before this change:
Total: ~840 Pass starts/hr. The thirdshift repo alone had Pickup on five hosts every 2 minutes (~150/hr). At an unmeasured guess of ~6 REST calls per idle Pass, that alone would use the whole quota before any active run's CI watching. Rate-limit lines in the hosts' cron logs (all-time): stephens.page 259, thirdshift.app 135, orchestrate 56, dev 38, Lima 26, test 3.
Operator mitigation applied (not a code change). Cron schedules were slowed to ~330 starts/hr. Architect on thirdshift.app now runs hourly. thirdshift Pickup runs every 2 min only on thirdshift.app; other hosts run it every 10 min, staggered. Every-minute Pickups now run every 5–10 min, and Lima's Triage/Review/Fix every 15 min. Prior crontabs are saved on each host as
~/crontab.before-2026-11-10b.Implications for shaping (Questionnaire items 2 and 6):
docs/guide.md.JacobStephens2 commentedon Nov 11, 2026
Superseded by Spec #1994 (Tickets #1995, #1996, #1997). The questionnaire above was settled as follows:
gh api rate_limit.statusand the Console show the Quota wait.ghcalls;JacobStephens2 commentedon Nov 11, 2026
Closing as superseded by #1994.