{"version":"2.1.287","anchor":"built-in-gh-api-stand-in-for-sessions-with-no-github-cli","canonical_anchor":"built-in-gh-api-stand-in-for-sessions-with-no-github-cli","heading":"Built-in gh api stand-in for sessions without the GitHub CLI","tier":"notice","area":"GitHub","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287\/e\/built-in-gh-api-stand-in-for-sessions-with-no-github-cli","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287","markdown":"### Built-in `gh api` stand-in for sessions without the GitHub CLI\n\nWhen no GitHub CLI is found at session start, a built-in gh handles `gh api` REST calls through the session's GitHub proxy\n\n**Unclear.** It is not clear what starts this stand-in or whether it is used by default in every session that lacks the GitHub CLI.\n\n**What**\n\n`gh` is GitHub's command-line tool. When a session finds no GitHub CLI at startup, Claude Code now provides its own stand-in:\n\n- What it does: it handles only `gh api <REST endpoint>`, sending the request through the session's GitHub proxy without a token.\n\n- Supported options: `--method`, `--field`, `--raw-field`, `--header`, `--input`, `--paginate`, `--jq`, `--include` and `--hostname`.\n\n- Placeholders: `{owner}`, `{repo}` and `{branch}` are filled from `GH_REPO` or the git remotes.\n\n- Refusals: it refuses GraphQL, unsupported options and headers that are not on its allowed list.\n\n- Off switch: it is disabled when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set.\n\n- How it runs: it is a per-session script that calls Claude Code with a hidden `--gh-standin` argument, and a new `ghStandinMain` entry handles it.\n\n- Which gh wins: when the stand-in is in use and a PATH is set, its folder is added after the PATH instead of before it, so a real `gh` runs if one is there.\n\n- Claude is told: the instructions about the session proxy now say no GitHub CLI was found and that `gh` here is a built-in stand-in that supports only `gh api <REST endpoint>`.\n\nThe `--daemon-worker`, remote-control and agents startup paths also now call a setup step for global agents, and a new startup check was added at entry.\n\n**Why**\n\nSessions without `gh` installed can still make GitHub REST calls. Other `gh` commands will not work there, and Claude is told so.\n\n- Area: GitHub\n- Tier: You'll notice\n- Useful: 5\/5\n- Signal: 4\/5"}