Skip to content

GitHub non-review @codex comments report missing environment while direct cloud tasks and reviews work #20093

Open

Description

@GianniGabriel

What issue are you seeing?

GitHub integration environment resolution appears to fail only for non-review @codex comments.

In a private GitHub repo with Codex configured:

  • @codex review works on the same PR / code review path works.
  • Direct Codex Cloud task creation against the repo environment works and reaches READY with no diff.
  • The GitHub App installation is scoped to the repo, and Codex settings show the repo enabled.
  • A non-review PR comment such as @codex fix the suggested changes or @codex inspect the current PR context... receives this bot reply instead:

To use Codex here, create an environment for this repo.

This appears inconsistent with the GitHub integration docs, which say non-review @codex comments should start a cloud task using the pull request as context. I can provide exact repo, environment, task, and GitHub comment IDs privately; avoiding posting those on a public issue.

What steps can reproduce the bug?

  1. Set up a Codex Cloud environment for a private GitHub repository.
  2. Enable Codex code review for that repository.
  3. Confirm direct Cloud task creation against the environment works.
  4. Confirm @codex review works on a PR in the same repo.
  5. On the same PR, post a non-review comment such as @codex inspect the current PR context and report whether you can attach to the Codex cloud environment. Do not modify files, create commits, or push changes.
  6. Observe the bot reply: To use Codex here, create an environment for this repo.
  7. Reinstall the ChatGPT Codex Connector GitHub App, create a fresh post-reinstall environment for the repo, delete older duplicate environments, and retest. The same bot reply still appears.

What is the expected behavior?

A non-review @codex comment on a PR should start a Codex Cloud task using the PR as context, or report the real blocker. It should not say to create an environment when a runnable environment for the repo exists and direct Cloud tasks can bind to it.

Additional information

This seems specific to the GitHub non-review task trigger resolver. The review path and direct Cloud task path both work.

Docs reference: https://developers.openai.com/codex/integrations/github#give-codex-other-tasks

Activity

  1. added
    bug
    on Apr 28, 2026
  2. added
    codex-web
    on Apr 28, 2026
  3. dmthepm commented on May 3, 2026

    @dmthepm

    Having same issue

  4. awlee01 commented on May 5, 2026

    @awlee01

    +1 - disconnecting and reconnecting github connector, uninstalling and reinstalling github app, and adjusting repo access did not accomplish anything

  5. Steadyon commented on May 13, 2026

    @Steadyon

    +1 yup same. has never worked for me, always get this error. have tried disconnecting everything and re-connecting, no luck

  6. dmthepm commented on May 13, 2026

    @dmthepm
  7. bwireless commented on Jul 29, 2026

    @bwireless

    Any updates on this?

  8. andreash-sys commented on Oct 15, 2026

    @andreash-sys

    Same issue here, still happening on 15 Oct 2026.

    Repo: andreash-sys/aots-ai (personal ChatGPT workspace)

    • "@codex review" works fine.
    • Any other "@codex " comment (plan/implement) gets "To use Codex here, create an environment for this repo" within seconds.
    • A Codex Cloud environment for this repo exists (shown under Codex Cloud > Environments, linked to andreash-sys/aots-ai). Switching the GitHub connector to "All repositories" did not help.
    • Direct tasks in the Codex app work.

    Examples: PR #135 comments on 15 Oct 2026, 06:00, 06:27 and 06:44 UTC.
    A support case is open as well. Is there any workaround or ETA?

  9. zc994312-dot commented on Oct 16, 2026

    @zc994312-dot

    Same symptom here, reproducible today (2026-10-16) on a private repo that has a working environment:

    • @codex review on a PR → works; a normal review receipt comes back.
    • Any other @codex ... comment on the same PR (e.g. @codex implement this, @codex address that feedback) → the bot replies within seconds:
      To use Codex here, create an environment for this repo.
    • A Codex Cloud environment for that repo exists, shows up in Codex settings/environments, and direct Cloud tasks against it work fine on the same account.
    • Re-installing the ChatGPT Codex Connector GitHub App and creating a fresh environment did not help — same as other reports above. The bot's "create an environment" link just leads to the environment that already exists.

    Additional datapoint: it looks PR-scoped and sticky, not purely random. On one PR every non-review @codex comment fails consistently, while @codex review on that same PR keeps working.

    Timeline (UTC), same PR, same environment:

    • 10:14:58 — non-review @codex comment posted.
    • 10:15:21 — bot: To use Codex here, create an environment for this repo.
    • 10:16:54 — @codex review on that PR → normal Codex Review receipt (reviewed the exact head commit).
    • 10:17:34 — non-review @codex comment posted.
    • 10:17:46 — bot: To use Codex here, create an environment for this repo.

    So on the same PR, seconds apart, the review path resolves the environment and the non-review task path does not. Comment IDs, PR number and the environment ID are available — just tell me where to send them privately (or say the word here and I'll DM via the support case).

    Is there a workaround or an ETA for this? A usable non-review @codex trigger on GitHub is the whole point of the GitHub integration, and right now the only reliable remote path is @codex review.

  10. BrianGrug commented on Oct 19, 2026

    @BrianGrug

    We're running into the same issue

  11. nelhousni commented on Oct 20, 2026

    @nelhousni

    Same issue here (2026-10-20), personal ChatGPT workspace, private repo in a GitHub org.

    • @codex review works on the PR, but any other @codex … comment on the same PR gets "To use Codex here, create an environment for this repo." within seconds.
    • The link in the bot reply (chatgpt.com/codex/cloud/settings/environments) is broken: it redirects to the ChatGPT home page. Environments are now under Settings → Codex Cloud (chatgpt.com/settings/codex-cloud).
    • I created a fresh environment for the repo on the new page, retested, and got the same reply.
    • Related: since the migration from the legacy Codex settings to the new Codex Cloud settings, the legacy environments show up as "Unpublished · Shared by you" and "Delete environment" is disabled, even though I'm the admin. So I can't remove the old duplicates. Maybe the task resolver is still picking those up?
  12. rogerchen381 commented on Oct 24, 2026

    @rogerchen381

    Update (October 24, 2026): this reproduction is not yet confirmed to be a product bug. OpenAI's GitHub integration documentation clarifies that non-review @codex comments use Codex Cloud (Legacy), whereas the successfully published environment in the reproduction was the new Codex Cloud environment. The missing legacy repository/environment configuration could explain the bot reply. Checking the repository under https://chatgpt.com/settings/code-review and its legacy integration is the next diagnostic. Please treat this report as unconfirmed pending the legacy configuration check, not proof of the environment resolver defect.

    Original observation:

    • On October 24, 2026 (America/Toronto), a ChatGPT Plus account had a published new Codex Cloud environment for a GitHub repository.
    • Direct Codex Cloud task successfully edited repository files and opened a PR against a feature branch.
    • A top-level, non-review PR comment beginning @codex Please implement ... was accepted.
    • chatgpt-codex-connector[bot] replied: "To use Codex here, create an environment for this repo."
    • No coding-task acknowledgment or new commit followed on the PR when checked shortly afterward.

    The new Cloud environment being published is insufficient evidence that the legacy integration was configured. Repository/account identifiers omitted for privacy.

  13. abrahamwong604 commented on Oct 25, 2026

    @abrahamwong604

    +1, same issue on a ChatGPT Plus account. Every @codex comment on issues in a private repo gets "To use Codex here, create an environment for this repo." There's one published Codex Cloud environment linked to that repo, and it works from chatgpt.com. The ChatGPT Codex Connector has read/write on issues and PRs for the repo, and repo name casing matches. Deleting a duplicate environment didn't help, and there's no Legacy Codex Cloud section in settings.

  14. BenkiNew commented on Oct 25, 2026

    @BenkiNew

    Reproduced live today, 2026-10-25 (Windows 11 10.0.26100, personal ChatGPT account, a private repository). Full timeline:

    • ~15:55Z and 16:04Z — @codex review blocked by quota ("You have reached your Codex usage limits for code reviews").
    • 16:50:10Z — @codex review after quota reset → 🔄 running, ✅ completed 16:52:00Z with a real P1 finding. Four more review cycles on subsequent fix commits all worked normally.
    • ~16:45–17:00Z — created the repo environment via the new Cloud Environment Onboarding: Setup flow (Settings → Codex Cloud); onboarding ran pip check / ruff / pytest (2882 tests, 7 Windows-dependency skips), saved install script + start skill, and I published it.
    • 16:56:34Z and 17:09:32Z (i.e. after publishing) — @codex address that feedback → bot replies within ~12 seconds: "To use Codex here, create an environment for this repo."

    Regarding the triage note ("check the repository under https://chatgpt.com/settings/code-review and its legacy integration"): that page for this repo exposes only review settings (Automatic check / What to check / Trigger / Exhaustive review + AGENTS.md / SECURITY.md instructions). There is no legacy environment section anywhere in the UI to configure or publish — the suggested diagnostic is physically impossible for users today. So the asymmetry stands: review path = new Codex Cloud (works), non-review @codex comments = legacy resolver that can no longer be satisfied from settings.

  15. oskarbuild commented on Oct 27, 2026

    @oskarbuild

    +1, experiencing the same issue. I've configured a Codex environment for my private repository, but I'm unable to mention @codex in GitHub comments.

  16. pts-nikhil-ranka commented on Oct 30, 2026

    @pts-nikhil-ranka

    +1.
    I am facing a similar issue. Reviewing the PR works fine. Post review, the comments requesting the issues to be resolved are responded to with:
    "To use Codex here, create an environment for this repo."
    Note: The environment is already installed/published in Codex.

  17. beanb0t-svg commented on Nov 5, 2026

    @beanb0t-svg

    +1, reproduced 2026-11-05 (Windows, personal ChatGPT account, private repo, "Who can use" offers only "Only me").

    • @codex review on pull requests works.
    • An environment for the repo was created with Cloud Environment Onboarding: Setup (install script and start skill saved), and publishing from Chrome completes ("The environment was published").
    • Every non-review @codex comment, on an issue or on a pull request, gets "To use Codex here, create an environment for this repo." within about 8 seconds. Reproduced 7 times between 00:31Z and 02:17Z, before and after re-running onboarding and re-publishing.
    • Like BenkiNew, I can't find any legacy environment settings to configure.
  18. leonklingele commented on Nov 5, 2026

    @leonklingele

    I found a workaround that fixed automatic reviews for my private repository in a GitHub organization:

    1. Open https://chatgpt.com/settings/cloud-environments.
    2. Set up a legacy Codex Cloud environment for the repository.
    3. Keep automatic code review enabled in the repository’s review settings.
      After setting up the legacy environment, Codex automatically reviewed a newly opened PR.

    Before that, automatic reviews weren’t running despite “All PRs” and “On every push” being enabled. Codex also posted:

    To use Codex here, create an environment for this repo.

    The link in that message (https://chatgpt.com/codex/cloud/settings/environments) redirected me to the ChatGPT homepage. https://chatgpt.com/settings/cloud-environments was the working location.

    This confirms a workaround for automatic reviews in my setup. Whether it also resolves the non-review @codex task failures described in this issue still needs verification, but the legacy environment requirement and broken setup link seem relevant.

  19. beanb0t-svg commented on Nov 5, 2026

    @beanb0t-svg

    Thank you this worked! I've been stuck on the same problem, and the legacy environment fixed it for me too! @codex is running tasks again. 🙏

  20. eugenschumacher745-create commented on Nov 8, 2026

    @eugenschumacher745-create

    Confirming a closely related failure as of 2026-11-08 from a mobile-only user with a personal ChatGPT account.

    • The ChatGPT Codex Connector GitHub App is installed with All repositories access and the connector can see all 38 repositories.
    • Non-review @codex ... comments on private PRs were received by the connector, but the bot replied within 9–12 seconds: “To use Codex here, create an environment for this repo.”
    • This happened repeatedly on 2026-10-29, 2026-11-01, and 2026-11-02.
    • GitHub authentication and webhook delivery are therefore working.
    • A current-generation cloud environment is available, but the documentation says existing GitHub integration workflows still resolve through Codex Cloud (Legacy). The response does not explain whether the actual failure is “no Legacy environment,” “wrong environment generation,” “unpublished environment,” or this resolver bug.
    • The link returned by the bot (/codex/cloud/settings/environments) is stale/broken in the current product flow.

    For an account with dozens of repositories, manually guessing which environment generation the resolver needs is not a usable setup path—especially from a phone.

    Requested fixes:

    1. Make the non-review resolver recognize the supported configured environment.
    2. Return the real failure reason and the exact repository/environment type it tried to resolve.
    3. Replace the stale link with a working deep link.
    4. Provide a bulk/default setup for all repositories authorized to the GitHub App.

    Private repository names and comment IDs can be supplied privately to OpenAI Support if needed.

  21. Matleyx78 commented on Nov 10, 2026

    @Matleyx78

    Same problem here, reproducible on a public repository.

    Setup:

    What happens:

    What works:

    So the environment exists and is usable, but the GitHub mention trigger does not find it. It looks like the connector still resolves environments through the old Codex cloud settings, which are no longer reachable after the merge into ChatGPT.

    Expected: "@codex " on an issue starts a cloud task in the published environment, or the reply points to a working settings page.

  22. torisetxd commented on Nov 23, 2026

    @torisetxd

    +1, can reproduce, the workaround doesnt work since the page doesnt exist anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcodex-web

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions