Skip to content

fix(review): explain-change gathers PR facts through REST so it works in cloud sessions #6750

Closed

Description

@kyle-sexton

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.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 10, 2026
  2. github-actions commented on Oct 10, 2026

    @github-actions
    Contributor

    Thanks for the report. Automated triage handed this issue to a maintainer.

    Automated triage. A maintainer reviews it.

  3. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    on Oct 10, 2026
  4. kyle-sexton commented on Oct 11, 2026

    @kyle-sexton
    ContributorAuthor

    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: 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.

    The needs-human label was left for Kyle to clear.


    Generated by Claude Code

  5. kyle-sexton commented on Oct 11, 2026

    @kyle-sexton
    ContributorAuthor

    Handoff note for whoever picks this up next. The overnight Claude run has stopped, and Kyle is moving issue work to Cursor.

    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.


    Generated by Claude Code

  6. added theissue type on Oct 12, 2026
  7. removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions