Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

work-items: github adapter takes GraphQL paths on gh 2.94+ even in cloud sessions, whose proxy refuses GraphQL

Chiusa
#7,289 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #8197 di @melodic-automation-lanes — integrata

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, shell
Ambito
tooling

Direzione di ricerca

Start with plugins/work-items/tools/work-item-tracker/lib/gh-version.sh and the read and create paths in adapters/github/common.sh and adapters/github/create-item.sh. Trace how the native gh surface is selected and how REST fallback currently works, then check the related cloud session behavior described in the issue. Done means reads and creates use REST when GraphQL is unavailable, with sub-issue and dependency operations reporting that they are unavailable in that environment.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent-ready work-class: scoped

Summary

The work-items GitHub adapter picks its read and create paths by gh version alone. On gh 2.94 or newer it reads items through gh issue view --json and creates them with native gh issue create, and both go through GraphQL. The live docs say the GitHub proxy in Claude Code cloud sessions refuses every GraphQL request, so in a cloud session with a new enough gh the adapter's read and create paths fail. The REST fallback exists, but only for older gh.

Affected area / component

plugins/work-items/tools/work-item-tracker/adapters/github/ (common.sh, create-item.sh) and plugins/work-items/tools/work-item-tracker/lib/gh-version.sh

Steps to reproduce

  1. In a Claude Code cloud session, install gh 2.94 or newer.
  2. Read or create an item through the work-item-tracker seam with the github adapter.

(Repro is from the code path and the docs; not run in a cloud session.)

Expected behavior

In a session whose GitHub proxy refuses GraphQL, the adapter uses its REST paths whatever the gh version.

Actual behavior

  • lib/gh-version.sh:22-30 (wit_gh_has_native_surface): returns 0 when gh is present and at least 2.94. It checks nothing about the environment.
  • adapters/github/common.sh:338-347 (wit_emit_item): with the native surface, reads through gh issue view --json; REST is used only otherwise.
  • adapters/github/create-item.sh:61 sets native=1 from the same check, and :87 then runs gh issue create. The REST branch at :116-118 already notes that "gh issue create resolves through GraphQL, which sandboxed sessions refuse with HTTP 403".
  • Live docs, https://code.claude.com/docs/en/cloud-environments#github-proxy (read 2026-10-12): the proxy "rejects requests to GitHub's GraphQL endpoint with a 403", and "gh subcommands that use GraphQL, such as gh pr and gh issue, get the same 403", regardless of the credentials supplied.

Suggested fix

Route to REST when the session is behind the proxy: detect a cloud session, or treat a GraphQL 403 whose message starts with "GitHub GraphQL is not available from Claude Code sessions" as a signal to fall back. Sub-issue and dependency edges have no REST form, so they need an explicit "unavailable here" error rather than a failed call.

Related: #3169 (cloud sessions ship an older gh, so today the version gate keeps them on REST by accident), #7240, #7223.

Environment

work-items on main as of 2026-10-12; Claude Code cloud sessions.

Found during the upstream-pointer sweep (PRs #7061-#7274).

Lingua principale
Shell
Stelle
22
Fork
2
Merge medio
7h 8m
PR unite (30g)
874

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di melodic-software/claude-code-plugins

Tutte le issue di melodic-software/claude-code-plugins

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.