Skip to content

docs: installing gh also breaks the surface probe - #301

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/gh-cli-mobile-support-1ri5z3
Aug 27, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/gh-cli-mobile-support-1ri5z3

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Follow-up to #300, which is merged — this is a fresh branch off main, not a reopen.

Why

#300 recorded that an installed gh 403s on every repo-scoped call. True, but it reads as an efficiency note — "don't bother, it won't work" — and an agent in these sessions is root with apt available, so it can still talk itself into trying.

The sharper reason turned up while verifying that #300 didn't break the local-CLI path. gh auth status exits 0 in a remote session even while printing:

X Failed to log in to github.com using token (GH_TOKEN)
- The token in GH_TOKEN is invalid.

The proxy-injected placeholder in GH_TOKEN is enough to satisfy it. So the page's own decide-once probe —

command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1 \
    && echo "gh" || echo "mcp"

— answers gh in a session that installed it. That run then reads the page's commands as commands and walks straight into the 403s: the exact failure the probe exists to prevent. The probe is only honest while gh is absent.

That turns "do not install gh" from advice about wasted effort into something load-bearing for the mechanism, which is what the page now says.

What changed

One paragraph appended to the "Installing gh does not work" section of skills/GITHUB_ACCESS.md. Docs only.

Testing


Generated by Claude Code

The page told a run not to install `gh` on the grounds that the result would
403 — true, but it reads as an efficiency note, so an agent that is root with
apt available can still talk itself into it.

The sharper reason, measured: `gh auth status` exits 0 in a remote session
even while printing "The token in GH_TOKEN is invalid", because the
proxy-injected placeholder satisfies it. A session that installed `gh` then
answers this page's own decide-once probe with `gh`, follows the commands as
written, and walks into the 403s — the exact failure the probe exists to
prevent. The probe is only honest while `gh` is absent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NHQzyeUkEHqMmEZDo9zsNX
@Jammy2211
Jammy2211 merged commit 309783c into main Aug 27, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the claude/gh-cli-mobile-support-1ri5z3 branch August 27, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants