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
{{ message }}
Repository navigation
fix(review): explain-change gathers PR facts through REST so it works in cloud sessions #6750
No PR yet; found in both PLAN 7.4 cloud live-check runs on 2026-10-10.
Problem
In a Claude Code cloud session, gh pr view and gh repo view fail with HTTP 403: GitHub GraphQL is not available from Claude Code sessions; use the REST API. explain-change's steps (and the fresh-context risk checker's fixed prompt, which uses gh pr diff) rely on those commands, so the agent had to improvise REST fallbacks each run, including editing the checker's prompt.
Fix
Use REST forms throughout explain-change and its checker brief (gh api repos/<owner>/<repo>/pulls/<n>, .../pulls/<n>/files, gh api -H 'Accept: application/vnd.github.diff' repos/<owner>/<repo>/pulls/<n>, gh api repos/<owner>/<repo> --jq .visibility). REST works both locally and in cloud sessions, so one path serves both.
Done when
explain-change runs end to end in a cloud session with no GraphQL call and no improvised fallback.
explain-change already reads PR facts through /source-control:pull-request view (#7026, per ADR 0060), so the fix sits in that action's script: view now reads the PR, its files and its diff through gh api (REST) with the same output fields, and finds a branch's PR through the pulls head filter. Verified with the updated read-pr.test.sh (45 pass), the explain-change node tests, and a live end-to-end run of explain-change's fact path (facts, diff, digest policy, publish gate) in a cloud session where gh pr view returns the GraphQL 403.
Left for a human: the list action still uses gh pr list (GraphQL); explain-change does not call it, but quality-gate and improve do. A follow-up issue may be worth filing. A head branch on a fork is not found by branch name; pass the number.
Notes: Fixed in source-control read-pr.sh view (REST only); explain-change unchanged. Follow-up: list action still uses gh pr list (GraphQL), used by quality-gate and improve. Fork PRs need a number
Next step: Review the draft PR; decisions for Kyle are listed in its body. Mark it ready once Kyle agrees (that starts the CI test and review lanes), then drive CI green.
Where a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red ci-status by design until it is marked ready.
Activity
github-actions commentedon Oct 10, 2026
Thanks for the report. Automated triage handed this issue to a maintainer.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 11, 2026
Draft PR: #7081 (branch
fix/6750-read-pr-over-rest).explain-change already reads PR facts through
/source-control:pull-request view(#7026, per ADR 0060), so the fix sits in that action's script:viewnow reads the PR, its files and its diff throughgh api(REST) with the same output fields, and finds a branch's PR through the pullsheadfilter. Verified with the updatedread-pr.test.sh(45 pass), the explain-change node tests, and a live end-to-end run of explain-change's fact path (facts, diff, digest policy, publish gate) in a cloud session wheregh pr viewreturns the GraphQL 403.Left for a human: the
listaction still usesgh pr list(GraphQL); explain-change does not call it, but quality-gate and improve do. A follow-up issue may be worth filing. A head branch on a fork is not found by branch name; pass the number.The
needs-humanlabel was left for Kyle to clear.Generated by Claude Code
kyle-sexton commentedon Oct 11, 2026
Handoff note for whoever picks this up next. The overnight Claude run has stopped, and Kyle is moving issue work to Cursor.
fix/6750-read-pr-over-restWhere a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red
ci-statusby design until it is marked ready.Generated by Claude Code