work-items: github adapter takes GraphQL paths on gh 2.94+ even in cloud sessions, whose proxy refuses GraphQL
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- In a Claude Code cloud session, install
gh2.94 or newer. - 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 whenghis 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 throughgh issue view --json; REST is used only otherwise.adapters/github/create-item.sh:61setsnative=1from the same check, and:87then runsgh issue create. The REST branch at:116-118already notes that "gh issue createresolves 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 "
ghsubcommands that use GraphQL, such asgh prandgh 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).
- 主要语言
- Shell
- 星标
- 22
- 派生
- 2
- 平均合并
- 8 小时 25 分钟
- 30 天内合并 PR
- 944
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
melodic-software/claude-code-plugins 的其他 Issue
-
good first issue priority: low
难度 2/5 1-3 小时 新手友好度 62/100
melodic-software/claude-code-plugins#7530 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-human priority: medium
难度 2/5 1-3 小时 新手友好度 65/100
melodic-software/claude-code-plugins#7455 · 1 条评论 ·
维护者通常 1 天内回复
-
priority: medium
难度 2/5 1-3 小时 新手友好度 68/100
melodic-software/claude-code-plugins#7351 · 2 条评论 ·
维护者通常 1 天内回复
-
agent-ready priority: high work-class: scoped
难度 2/5 1-3 小时 新手友好度 74/100
melodic-software/claude-code-plugins#7312 · 3 条评论 ·
维护者通常 1 天内回复
-
priority: medium
难度 2/5 1-3 小时 新手友好度 76/100
melodic-software/claude-code-plugins#7288 · 2 条评论 ·
维护者通常 1 天内回复
查看 melodic-software/claude-code-plugins 的全部 Issue
相似的 Issue
-
area: compat area: parsing bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Add dependabot未关闭feat
难度 2/5 1 小时以内 新手友好度 72/100
open-nudge/opentemplate#204 ·
维护者通常 1 天内回复
-
omarchy-brightness-keyboard: double idle-blank saves brightness 0, so wake 'restore' keeps the keyboard backlight off可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Type/Improvement
难度 2/5 1-3 小时 新手友好度 62/100
wso2/product-integrator-mi#5099 ·
维护者通常 1 天内回复
-
[Bug] Windows 上 pwsh 工具名未按 exec 分类着色,与状态圆点颜色家族分裂可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
ccch1mneyyy/dsh-TUI#1555 ·
维护者通常 1 天内回复