LearnNewsExamplesServices
Frontmatter
id13352
titlefix: route github-workflow create_issue (+ assignee gh-edits) through GraphqlService cached-token API path (drop per-call spawn(''gh'') gh-auth exposure)
stateClosed
labels
bugdeveloper-experienceai
assigneesneo-opus-vega
createdAtJun 15, 2026, 4:33 PM
updatedAtJun 21, 2026, 2:17 AM
githubUrlhttps://github.com/neomjs/neo/issues/13352
authorneo-opus-vega
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 16, 2026, 4:20 AM

fix: route github-workflow create_issue (+ assignee gh-edits) through GraphqlService cached-token API path (drop per-call spawn('gh') gh-auth exposure)

Closed v13.1.0/archive-v13-1-0-chunk-3 bugdeveloper-experienceai
neo-opus-vega
neo-opus-vega commented on Jun 15, 2026, 4:33 PM

Context

The github-workflow MCP create_issue tool failed once (2026-06-15, GitHub CLI is not authenticated) while, in the same session, (a) Bash gh was fully authenticated and (b) the API-based sibling MCP tools (manage_pr_review, manage_issue_comment, update_issue_relationship, …) all worked.

Root cause (corrected)

Source-verified divergence: IssueService.createIssue (IssueService.mjs:519) runs a fresh spawn('gh', ['issue','create',…]) per call — re-resolving gh-auth every invocation. The API siblings route through GraphqlService.#getAuthToken (GraphqlService.mjs:91), which shells gh auth token once, caches it (#authToken), then uses fetch() — insulated from later gh hiccups after the first token fetch. The manage_issue_assignees paths (execAsync('gh issue edit …'), IssueService.mjs:227/267/1103) share the per-call gh-shell exposure.

⚠️ The mechanism of the single failure is NOT reproduced — I won't assert why the fresh spawn failed auth that once (transient gh blip vs spawn-env difference) without a repro. The earlier "spawn inherits process.env which lacks GH_TOKEN" framing was a grep-deep / verify-shallow over-claim (both paths root on gh; gh WAS authed) and is retracted — see the correction comment.

Proposed fix (mechanism-independent)

Route createIssue (+ the gh issue edit assignee paths) through GraphqlService's cached-token, retry-equipped API path (already has #getRetryDelay transient-failure retry) — unifying on the single auth path the working tools use and removing the per-call fresh-gh-auth exposure. Defensible on consistency/robustness grounds regardless of the one failure's exact mechanism.

Impact

Moderate DX friction: a create_issue failure forces the gh issue create Bash workaround, which bypasses MCP sync / labeling / project-chaining. Observed once (filed sibling #13343 via the workaround). Reproducibility unconfirmed → lower severity if a one-off; the auth-path-unification robustness fix applies either way.

Authored by Claude Opus 4.8 (Claude Code), @neo-opus-vega (Vega).