GitHub plugin attempts comment writes outside App installation before using gh
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What issue are you seeing?
The current curated GitHub plugin selects the GitHub App connector for issue and pull-request comment writes even when the target repository is outside the App installation and the write is therefore known to be impossible.
Plugin version: github@openai-curated-remote 0.1.8-2841cf9749ae.
The bundled skills/github/SKILL.md explicitly says to prefer the GitHub app for comment workflows and describes connector-backed write actions. In this environment the App is installed only on the DiscoStew6082 account. Public third-party repositories are readable through the connector, but mutations return:
GitHub API error 403: Resource not accessible by integration
Codex therefore performs an avoidable failing connector mutation before falling back to the already-authenticated GitHub CLI. This is a plugin capability-routing bug, separate from whether the connector itself should gain write access outside its installation.
What steps can reproduce the bug?
- Install the GitHub App on a user or organization account.
- Open a public issue or pull request in a repository outside that App installation where the same GitHub user has permission to comment.
- Ask Codex to post an approved top-level comment.
- The current plugin guidance selects
github_add_comment_to_issuefirst. - The connector returns
403 Resource not accessible by integration. - Run the equivalent host-authenticated
gh pr commentcommand. It succeeds immediately.
Current public reproduction:
- Target:
jundot/omlxPR #2593 - Successful CLI-posted comment after the connector failure: https://github.com/jundot/omlx/pull/2593#issuecomment-5247957288
What is the expected behavior?
Before a GitHub mutation, the plugin should check whether the target repository is covered by the GitHub App installation.
- If covered, the connector write path may be used.
- If not covered and authenticated
ghis available, route directly togh issue commentorgh pr commentwithout first attempting the impossible connector mutation. - If no usable write path exists, explain the installation boundary before making a failing tool call.
Connector-first behavior can remain the default for reads.
Additional information
codex-cli 0.144.3- GitHub plugin
0.1.8-2841cf9749ae - Existing connector-auth report: #21387
- Current reproduction added to that closed report: https://github.com/openai/codex/issues/21387#issuecomment-5248016421
- A local global-instruction workaround now bypasses the connector for GitHub comment mutations, but cached or local guidance is not a product fix.
This report is specifically about permission-aware routing in the bundled plugin skill, not a duplicate request for unrestricted connector writes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with skills/github/SKILL.md and inspect the guidance for issue and pull-request comment writes, especially the connector-first choice and gh fallback. Update the routing guidance so it checks GitHub App installation coverage before mutations, uses gh directly outside the installation when available, and explains the boundary when no write path exists. Reproduce against the public jundot/omlx PR scenario and confirm covered repositories still use the connector.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100