openai / openai/codex

GitHub plugin attempts comment writes outside App installation before using gh

Open
#37,912 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI skills tool-calls
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?
  1. Install the GitHub App on a user or organization account.
  2. Open a public issue or pull request in a repository outside that App installation where the same GitHub user has permission to comment.
  3. Ask Codex to post an approved top-level comment.
  4. The current plugin guidance selects github_add_comment_to_issue first.
  5. The connector returns 403 Resource not accessible by integration.
  6. Run the equivalent host-authenticated gh pr comment command. It succeeds immediately.

Current public reproduction:

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 gh is available, route directly to gh issue comment or gh pr comment without 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.