Built-in gh in proxied sessions supports GitHub Enterprise hosts and explains itself better
The built-in gh used in proxied and cloud sessions now handles any GitHub Enterprise host, suggests gh api equivalents and gives clearer errors and help
Group of 4You'll noticeNo documentation foundImprovements
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
GitHubArea: what it touches
ImprovementsKind: in v2.1.288,
ImprovementsSection of the release
Unclear Which sessions use the built-in gh, and how the any-host mode is turned on, is not shown.
What
In some sessions, especially cloud sessions that reach GitHub through a proxy (a go-between service that forwards requests), the gh command Claude Code provides is not the real GitHub CLI. It is a small built-in stand-in where only gh api works, already signed in through the session's GitHub proxy. This release reworks that stand-in:
A --hostname is now checked as a GitHub Enterprise address and the API address is worked out from it. Before, only a fixed list of hosts was allowed. A bad name gets an error saying it is not a GitHub Enterprise host.
Unsupported commands such as gh pr create are mapped to the equivalent gh api form.
Requests to a host the proxy does not serve get a hint, and redirects to other hosts are refused with an explanation.
The refusal message now says that gh api <REST endpoint> works, that no other gh command exists, and gives an example: gh api repos/{owner}/{repo}/pulls/123.
The help text now describes the stand-in's scope, with a separate version for GitHub Enterprise, and says a real GitHub CLI installed during the session takes over once it is on PATH (the list of folders the shell searches for commands).
Error wording now says "built-in gh" instead of "gh stand-in".
New text was added that describes gh to the model as Claude Code's built-in GitHub client, not the GitHub CLI, with versions for Enterprise, any host, no jq, and runner setups. No place in this release was found that uses it yet.
Why
In proxied and cloud sessions, gh becomes usable with GitHub Enterprise and its errors point to what will work, so Claude should waste fewer attempts on gh commands that do not exist there.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhich sessions use the built-in `gh`, and how the any-host mode is turned on, is not shown.
Anthropic's release notes agreeAdded a built-in gh api to cloud sessions whose image has no GitHub CLI, and fixed the built-in sending control characters from file names…