Skip to content

Desktop connector plugins lose ChatGPT authentication with command-auth custom model provider #40610

Open

Description

@jvenezia

What version of the Codex App are you using (From “About Codex” dialog)?

26.818.61809 (build 7019)

What subscription do you have?

Plus

What platform is your computer?

Darwin 25.3.0 arm64 arm

What issue are you seeing?

Connector-backed plugins fail to load when a command-authenticated custom model provider is active, even though Codex is separately signed in with ChatGPT.

The visible error is:

Failed to load plugin connection

Connector requests fail with:

401 Unauthorized: Access token is missing

A credential-redacted app-server control test showed:

  • Custom command-auth provider active:
    authMethod = null
    requiresOpenaiAuth = false
    no ChatGPT credential returned

  • Built-in OpenAI provider selected using a transient override, with the same unchanged login:
    authMethod = "chatgpt"
    requiresOpenaiAuth = true
    ChatGPT credential present

codex login status reports Logged in using ChatGPT in both cases.

The desktop appears to derive the ChatGPT backend credential from the active model provider’s authentication mode. It also caches the missing-credential result, while the 401 retry path does not refresh when no credential was originally attached.

What steps can reproduce the bug?

  1. Sign in to Codex using ChatGPT.
  2. Configure a custom Responses API provider using command-backed bearer authentication.
  3. Select the custom provider globally.
  4. Restart the desktop app.
  5. Attempt to install any connector-backed curated plugin.
  6. The app displays “Failed to load plugin connection” before the connection flow starts.
  7. Temporarily selecting the built-in OpenAI provider restores the ChatGPT credential in a redacted app-server probe.

Generic configuration shape:

model_provider = "custom"

[model_providers.custom]
name = "Custom"
base_url = "https://example.invalid/v1"
wire_api = "responses"

[model_providers.custom.auth]
command = "credential-helper"
args = []

The endpoint and command above are non-functional placeholders.

What is the expected behavior?

ChatGPT account authentication and custom model-provider authentication should remain independent.

Connector and ChatGPT backend requests should use the existing ChatGPT session, while inference requests use the custom provider’s command-backed credential.

Additional information

Troubleshooting already performed:

  • Restarted the app.
  • Logged out and signed back in.
  • Completely removed and reinstalled the current OpenAI-distributed app.
  • Reset the desktop application profile.

The behavior remained unchanged.

Activity

  1. added
    app
    on Aug 25, 2026
  2. added
    bug
    app-server
    auth
    custom-model
    on Aug 25, 2026
  3. JuanJo-RC commented on Sep 23, 2026

    @JuanJo-RC

    Correction — October 1, 2026: my Azure workaround does not establish a fix for this command-auth issue

    I need to correct my earlier recommendation. In my separate Windows/Azure setup, which uses env_key plus a valid ChatGPT sign-in, adding requires_openai_auth = true to the existing Azure provider table is enough; our source patch is not needed.

    The current desktop is 26.928.3736.0, engine 0.159.2. The running engine's SHA-256 matches the official bundled engine, not our patched build. I report the affected functions working with this configuration, and a read-only GitHub connector call succeeded. Full correction: central report.

    However, this issue uses [model_providers.custom.auth] (command-backed authentication), not env_key. The official documentation explicitly says not to combine command-backed provider auth with requires_openai_auth, env_key, or experimental_bearer_token. Please do not treat my Azure configuration as a drop-in solution for this report or remove your credential helper on that basis.

    I withdraw the implication that my tests established a necessary or general fix for your exact setup. The macOS/command-auth reproduction remains unvalidated by me; I am not claiming this issue is resolved. The historical experiment below is retained for context, not as a recommendation to build a patched engine. I should have tested the simple configuration option in my own setup before proposing the patch.

    Historical patched-build experiment — superseded recommendation, retained for context

    Your credential-redacted comparison closely matches the app-server behavior we reproduced with Azure plus a separately stored ChatGPT login. We have documented a locally validated experiment, source paths, and test results in this comment on #45060.

    The proposed fix is to keep the ChatGPT identity used by app services independent of the inference provider's authentication requirement:

    • In account_processor.rs, do not hide an existing ChatGPT identity in getAuthStatus solely because the active provider has requires_openai_auth=false.
    • In account_processor/workspace_routing.rs, preserve the valid ChatGPT account/workspace for app services when the provider has no account of its own. Keep provider-owned accounts and requiresOpenaiAuth unchanged.
    • Keep token opt-in, refresh-failure handling, host-owned credential restrictions, and workspace/security checks intact. Do not substitute the provider's API key for a ChatGPT token or change inference authentication.

    On Windows desktop 26.917.6896.0, using a locally compiled engine based on rust-v0.155.0-alpha.16, the original engine returned no ChatGPT identity/token with Azure selected; the experimental engine returned the existing identity while keeping requiresOpenaiAuth=false. Chrome and in-app browser control passed, and read-only GitHub connector and plugin-directory calls succeeded. I have also manually tested Remote, which now works with this corrected build while keeping Azure.

    The linked report includes 48 targeted account/auth/workspace tests plus 4 provider credential-isolation tests, passing on each of Windows and Linux/WSL. The Remote check is a manual user test, separate from those automated tests.

    This supports a shared app-service authentication issue rather than a browser-only problem. Our live provider test was Azure on Windows, not this exact macOS/command-auth setup, and we have not tested every connector or a fresh connector installation/OAuth flow. A valid ChatGPT login is still required. Related Remote report: #36879.

    Sharing the diagnosis and tested approach for maintainer assessment, not claiming an upstream or universal fix.

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

    appapp-serverauthbugcustom-model

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions