Skip to content

Fix gh CLI compatibility guidance and diagnose an unwritable log cache #727

Closed

Description

@JacobStephens2

From the Oct 11–16 2026 Run retrospective, finding 7. Tracking issue: #721.

The evidence below is historical and attributed to the supplied report (repository snapshot 5504c97); it has not all been independently reproduced. Limited current-checkout checks were made at 53bb9c6. This is filed for maintainer triage, not automatic Pickup.

Requested outcome and validation

Update repository/Factory guidance to use commands that work with the supported gh versions, including JSON issue reads and API-based PR body/label updates where the older GraphQL paths fail after Projects classic retirement. Follow the existing workaround in src/github.rs rather than teaching sessions a known failing gh pr edit path.

For this host, verify a supported gh upgrade path and repair or redirect the root-owned /tmp/gh-cli-cache so failed Actions logs can be read. Inspect ownership and contents before any cleanup; the report's blanket removal command is an operational proposal, not a request to run it as part of filing this issue. Decide whether setup should check the gh version and cache writability. Keep host remediation and portable repository guidance explicit.

Verify issue/comment reading, PR body/label editing, and gh run view --log-failed on the chosen supported setup. If compatibility is intentionally bounded by a minimum version, document it and produce an actionable diagnostic.

Current checkout check: the installed CLI reports 2.45.0, and docs/agents/issue-tracker.md still prescribes gh issue view <n> --comments. Its JSON form works for this issue-filing session. The cache failure and recommended upgrade need fresh host verification.

Original finding, including evidence, proposed fixes, and confidence

7. Host gh 2.45 and a root-owned cache break the commands the docs prescribe (Host and Repo docs)

  • Evidence:
    • gh issue view 707 --comments exits 1 on this host with "Projects (classic) is being deprecated", and so does gh pr edit. The error appears in 22 of the 25 sessions.
    • Those failing forms are the ones prescribed by docs/agents/issue-tracker.md (gh issue view <n> --comments, gh pr edit --add-label) and implied by the thirdshift-pr skill.
    • thirdshift's own code already works around this. src/github.rs says "gh pr edit fails on the GitHub Projects (classic) sunset in older gh".
    • /tmp/gh-cli-cache has been owned by root since Sep 25. So gh run view --log-failed, the command the CI-fix prompt suggests, fails with "permission denied" in every CI-fix Repair.
  • Fix:
    • Install current gh from GitHub's apt repo.
    • sudo rm -rf /tmp/gh-cli-cache.
    • In the docs, use gh issue view <n> --json title,body,labels,comments and gh api --method PATCH repos/<o>/<r>/pulls/<n> -F body=@<file>.
    • Optionally, a minimum gh version in thirdshift setup.
  • Confidence: high.

Activity

  1. added
    documentation
    needs-triage
    bug
    on Oct 17, 2026
  2. JacobStephens2 commented on Oct 21, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Brief (ready-for-human)

    Category: bug
    Summary: Upgrade gh and repair the root-owned gh cache on both thirdshift hosts. The repository guidance part is done.

    Current state:

    • Done in the repository. The issue tracker guidance now reads issues with gh issue view <n> --json …. The prompts no longer prescribe gh issue view --comments (they forbid it) or gh pr edit. The only gh pr edit left is in the guidance's PR-triage section, which this repository has turned off.
    • Still broken on the thirdshift host as of 2026-10-21. gh is 2.45.0 (Ubuntu's package), and /tmp/gh-cli-cache has been owned by root since Sep 25. So gh run view <run-id> --log-failed, which the CI-fix Repair prompts suggest, fails with "permission denied" for the factory's user. stephens hasn't been checked.

    Steps:

    • On each host (thirdshift and stephens), look at /tmp/gh-cli-cache's owner and contents, then remove it or chown it to the user thirdshift runs as.
    • Install current gh from GitHub's apt repository in place of Ubuntu's 2.45.0.
    • As that user, check that these work: gh issue view <n> --json title,body,labels,comments, gh pr edit <n> --add-label <label>, and gh run view <run-id> --log-failed on a real failed run.
    • Note the versions here and close.

    Why this can't go to an agent: it needs sudo on two hosts and a change of package source.

    Out of scope: a gh version or cache check in Setup or thirdshift doctor (#905).

  3. added
    ready-for-human
    and removed
    needs-triage
    on Oct 21, 2026
  4. JacobStephens2 commented on Oct 28, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Fresh evidence from the 2026-10-28 retro of thirdshift's own runs. This is still happening on two hosts.

    • thirdshift.app and stephens.page still run Ubuntu's gh 2.45.0. orchestrate (2.96.0) and dev (2.97.0) are current.
    • Across all retained session traces, 389 tool calls on thirdshift.app and 126 on stephens.page failed with the Projects (classic) projectCards error. Most were plain gh pr view or gh issue view without --json, and each was retried with --json. orchestrate and dev had none.
    • About 23 more calls printed gh pr checks usage help, because 2.45 lacks flags that sessions use.

    Upgrading gh from GitHub's apt repository on those two hosts would remove both classes.

  5. JacobStephens2 commented on Oct 29, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI.

    Host remediation done on 2026-10-28. The repository guidance part was already done (see the Oct 21 brief).

    Upgrade: on both stephens.page and thirdshift.app, gh now comes from GitHub's apt repository (/etc/apt/sources.list.d/github-cli.list, key in /etc/apt/keyrings/githubcli-archive-keyring.gpg). It went from Ubuntu's 2.45.0 to 2.103.3, and regular apt upgrade will keep it current. Both hosts are still logged in as JacobStephens2.

    Cache: /tmp/gh-cli-cache is owned by jacob, the user Pickup and Console run as, on both hosts. Its contents are cached run logs from Oct 26–27, so nothing needed removing.

    Verified on both hosts as jacob:

    • gh issue view 727 --json title,body,labels,comments works.
    • A plain gh pr view 1513 (no --json) works, with no Projects (classic) projectCards error.
    • gh pr checks --help lists --required.
    • gh run view 40793824885 --log-failed on a real failed run exits 0 and prints the failed step's log.

    Not exercised: gh pr edit --add-label, so that no real PR got a label added and removed just for the test. It ran into the same Projects (classic) query that plain pr view used to fail on, and pr view now works.

    Running sessions that started before the upgrade keep the old binary until they restart. A gh version or cache check in Setup or thirdshift doctor stays out of scope; it's tracked in #905.

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

    bugdocumentationready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions