Repository navigation
docs: put the GitHub-surface fact where every session already reads it - #300
Merged
Merged
Conversation
Remote sessions have no `gh`, and skills that drive `gh` already point at skills/GITHUB_ACCESS.md — but only skill bodies do. An ordinary chat that never loads one of those skills discovers the problem by running `gh` and getting `command not found`, every time. Add the fact as a third bullet in the auto-loaded AGENTS.md remote-sessions block, alongside the pytest and session_bootstrap lines, so it is in context before anyone reaches for `gh`. Also record why installing `gh` is not the fix, measured in a remote session: `apt-get install -y gh` succeeds and `gh api user` works, but every repo-scoped call 403s — the egress proxy serves neither the REST repo paths nor GraphQL beyond a pinned set of PR-review operations, so `gh pr list`, `gh issue list`, `gh repo view` and `gh api repos/...` all fail. GraphQL being pinned means `gh` cannot be a drop-in even if an org admin connected the GitHub App, so the page's existing "do not install gh" now carries the reason rather than asking to be taken on trust. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NHQzyeUkEHqMmEZDo9zsNX
The guard walked PyAutoBrain/skills only, so the one gh-driving skill body outside it — PyAutoMind's create_issue — went uncovered and drifted. The mapping page lives here, so this suite is the only one positioned to guard both roots; walk PyAutoMind/skills as well, skipping that leg when the sibling is not checked out (the convention test_hygiene_conductor.py already uses for repos.yaml). Pointer resolution now checks both spellings: the relative markdown link a same-repo body uses, and the bare workspace path a cross-repo one needs (../../../PyAutoBrain/... would be noise). Offenders are reported repo-qualified so the path is actionable from the workspace root. Verified by regression: removing create_issue's pointer, and typo'ing its path, each fail the suite. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NHQzyeUkEHqMmEZDo9zsNX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Remote sessions have no
gh, andskills/GITHUB_ACCESS.mdalready maps everyghoperation onto its MCP tool. But the pointer to that page lives only inside skill bodies. A chat that isn't running one of those skills never sees it — it reaches forgh, getscommand not found, and rediscovers the problem from scratch. That is the "loads of chats complain they can't usegh" symptom.What changed
AGENTS.md— a third bullet in the remote-sessions block, next to thepytest -n autoandsession_bootstraplines. That block is in every session's context, so the fact now lands before anyone typesgh. Nothing in any auto-loadedAGENTS.mdmentioned GitHub at all previously.skills/GITHUB_ACCESS.md— a new section recording why installingghis not the fix. The page already said "do not try to installgh"; it now carries the reason, which matters because any capable agent in these sessions is root with apt available and will otherwise just do it.tests/test_gh_surface.py— the guard walkedPyAutoBrain/skillsonly, so the onegh-driving skill body outside it (PyAutoMind'screate_issue) went uncovered and drifted. It now walks PyAutoMind's skill root too, skipping that leg when the sibling isn't checked out — the conventiontest_hygiene_conductor.pyalready uses forrepos.yaml. Pointer resolution checks both spellings: the relative markdown link a same-repo body uses, and the bare workspace path a cross-repo one needs.Merge order: PyAutoMind#344 goes first
Correcting an earlier claim in this description that the two PRs were independent — they are not, and this PR's own first CI run is what proved it.
tests.ymlchecks PyAutoMind out pinned to main, deliberately ("this gate tests Brain against the CURRENT organism identity"). So the widened guard asserts against PyAutoMind's livemain, which does not yet carry thecreate_issuepointer — that is in PyAutoLabs/PyAutoMind#344. The first run here failed with exactly that, which is the guard doing its job across repos rather than a defect:Merge PyAutoMind#344, then re-run this PR's CI — no change needed here.
The measurement behind it
Installed
gh2.45.0 via apt in a remote session, exercised it, then removed it:gh api user,gh api rate_limitgh api repos/{owner}/{repo}(and/pulls,/issues,/actions/runs)403— "GitHub access is not enabled for this session"gh pr list,gh issue list,gh repo view403— "This GraphQL query is not enabled for this session"gh auth statusTwo independent walls: REST repo paths aren't served, and GraphQL is pinned to a small set of PR-review operations — which is where most of
gh's porcelain lives. The same repos work fine throughmcp__github__*, which carries a different, repo-scoped credential. Because of the second wall,ghcould not be a drop-in here even if an org admin connected the GitHub App.An installed-but-403ing
ghis worse than none: the binary looks healthy, so a run burns turns retrying instead of switching surface.Testing
python3 -m pytest -q -n auto— 559 passed locally (where both repos are checked out at this branch's state).create_issue's pointer, and typo'ing its path, each fail the suite with a repo-qualified path.python3 PyAutoMind/scripts/repos_sync.pydrift check — OK (the generated tables inAGENTS.mdare untouched).