Add Feature to login to codex cli with github copilot subscription · Issue #8361 · openai/codex · GitHub
Skip to content

Add Feature to login to codex cli with github copilot subscription #8361

Closed as not planned

Description

@styler-ai

What feature would you like to see?

As an enterprise I would like to use codex cli with the github copilot subscription

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    authIssues related to authentication and accounts
    on Dec 20, 2025
  2. peixotorms commented on Jan 10, 2026

    @peixotorms

    You can use github copilot with opencode.
    I would also like to use it with codex cli, as I feel its a better client.

    However note, github copilot context is limited to about 128k tokens, so even if it could be used, its not going to perform the same.
    Even if models are the same, copilot has limited context, so just a heads up.
    On Opencode with github, it's constantly compacting due to the small context limit, which doesn't happen if you use OpenAI API for example.

  3. hchaudhary1 commented on Jan 18, 2026

    @hchaudhary1

    Github Copilot now has GPT-5.2-codex with full 272k context! We can use GHCP login via codex-vsc-extension, but would be nice also via CLI

  4. Vad1mo commented on Feb 3, 2026

    @Vad1mo

    I somehow don't see that option. (3 feb. 2026)

    Image
  5. postpersonality commented on Feb 3, 2026

    @postpersonality

    @hchaudhary1 thanks!

    I've installed both GitHub Copilot and Codex. That works indeed.

  6. postpersonality commented on Feb 4, 2026

    @postpersonality

    @Vad1mo just hit "sign in with chatgpt"

  7. Vad1mo commented on Feb 4, 2026

    @Vad1mo

    @postpersonality indeed this works!
    Some kind of magic

  8. styler-ai commented on Feb 20, 2026

    @styler-ai
    Author

    Any update?

  9. styler-ai commented on Feb 28, 2026

    @styler-ai
    Author

    Hi, sry that I post again, but it would be great if I would get a response. This would be a major step to get codex cli used by more developers. Most enterprises use github copilot enterprise, so having an easy access to agentic coding is needed. In my team we have about 300 developers and in a huge enterprise we can't just switch from github copilot to openai keys for everyone. These are corporate deals. Switching this takes sometimes years. We would rather give all developers codex cli with github copilot access and then restrict it to e.g. codex models only being support as an example. This is doable. Feedback would be great @etraut-openai Thank you so much for your support

  10. etraut-openai commented on Feb 28, 2026

    @etraut-openai
    Contributor

    @styler-ai, Github copilot is a different product by a different company. It leverages some of the same models used by Codex, but those models are hosted by Github (Microsoft) rather than OpenAI. I don't think the Github copilot models are hosted in a way that is compatible with the Codex harness. You'd need to contact someone on the Github copilot team to confirm. The Codex harness works with any model that is hosted using the "responses" API. Microsoft makes OpenAI models available through Azure AI Foundry, and you can use the Codex harness with those models, but I don't think those are part of a Github Copilot subscription.

    If you'd like to use OpenAI-hosted Codex models, you'll need to use an OpenAI subscription account or API Keys. If you're interested in an enterprise subscription, you can contact our sales team.

    I'm going to close this issue because this really isn't something that the Codex team can offer. It's a feature request for Github copilot.

  11. styler-ai commented on Feb 28, 2026

    @styler-ai
    Author

    @styler-ai, Github copilot is a different product by a different company. It leverages some of the same models used by Codex, but those models are hosted by Github (Microsoft) rather than OpenAI. I don't think the Github copilot models are hosted in a way that is compatible with the Codex harness. You'd need to contact someone on the Github copilot team to confirm. The Codex harness works with any model that is hosted using the "responses" API. Microsoft makes OpenAI models available through Azure AI Foundry, and you can use the Codex harness with those models, but I don't think those are part of a Github Copilot subscription.

    If you'd like to use OpenAI-hosted Codex models, you'll need to use an OpenAI subscription account or API Keys. If you're interested in an enterprise subscription, you can contact our sales team.

    I'm going to close this issue because this really isn't something that the Codex team can offer. It's a feature request for Github copilot.

    @etraut-openai the thing is that this login is possible in opencode but after we tested both clis codex is just better. You can logon in opencode with the github copilot account, so maybe you have the chance to suggest it to your team. You could restrict e.g.the model selection from github copilot only to openai models instead of all modelsx just an idea. So again: in opencode it works. Also it works with the vscode plugin, why not with codex cli?

    this is what I mean:
    https://github.blog/changelog/2026-01-16-github-copilot-now-supports-opencode/

    imho one could add the same login method also in codex cli and then add a restriction to OpenAI Models?

    So OpenAI models are supported by github copilot, so imho it doesnt make sense that you would have a collaboration with github copilot and host your models there and then we have to use another cli like opencode to use those models, it would rather be better to use those models with the cli they are ment to be used.
    would be great, like I said if you could reflect on this for a bit longer. thanks

  12. johnib commented on Apr 5, 2026

    @johnib

    For anyone still looking for this - I maintain a copilot-api fork that bridges exactly this gap. It's a proxy that exposes a full Responses API endpoint using your existing Copilot subscription, so Codex CLI works out of the box. One npx command to start.

    Been maintaining it for ~9 months for several folks on my team who rely on it heavily. You're welcome to give it a try - copilot-api-node20 on npm

    npx copilot-api-node20@latest start --codex
    

    P.S. The -node20 in the package name is a relic - the original reason I forked and diverged was just to add Node 20 support. The name stuck. :)

    P.S.2 With my version you also get web_search support (via Tavily, free API key with 1K searches / month)

    @styler-ai

  13. tuandinh0801 commented on Apr 7, 2026

    @tuandinh0801

    For anyone still looking for this - I maintain a copilot-api fork that bridges exactly this gap. It's a proxy that exposes a full Responses API endpoint using your existing Copilot subscription, so Codex CLI works out of the box. One npx command to start.

    Been maintaining it for ~9 months for several folks on my team who rely on it heavily. You're welcome to give it a try - copilot-api-node20 on npm

    npx copilot-api-node20@latest start --codex
    

    P.S. The -node20 in the package name is a relic - the original reason I forked and diverged was just to add Node 20 support. The name stuck. :)

    P.S.2 With my version you also get web_search support (via Tavily, free API key with 1K searches / month)

    @styler-ai

    @johnib I have tried your package, works great, any plan to opensource the code?

  14. styler-ai commented on Apr 7, 2026

    @styler-ai
    Author

    I still think this should be integrated into codex ootb and the model selection be limited to openai models. Otherwise people will switch to opencode @etraut-openai

  15. vhbui02 commented on Apr 12, 2026

    @vhbui02

    The Codex harness works with any model that is hosted using the "responses" API.

    I can't find the link to the official GitHub Copilot documentation stated that they support the Responses API but I can confidently say that GitHub Copilot model supports it, given the logic of the following 3rd-party clients:

    Microsoft makes OpenAI models available through Azure AI Foundry, and you can use the Codex harness with those models, but I don't think those are part of a Github Copilot subscription.

    Is it matter if it's hosted by Microsoft or placed on Azure AI Foundary? Last time I checked harness is a client-side thing, unless OpenAI models hosted on OpenAI cloud platforms have some proprietary server-side Codex harnesses that I don't know about.

  16. styler-ai commented on Apr 12, 2026

    @styler-ai
    Author

    The Codex harness works with any model that is hosted using the "responses" API.

    I can't find the link to the official GitHub Copilot documentation stated that they support the Responses API but I can confidently say that GitHub Copilot model supports it, given the logic of the following 3rd-party clients:

    Microsoft makes OpenAI models available through Azure AI Foundry, and you can use the Codex harness with those models, but I don't think those are part of a Github Copilot subscription.

    Is it matter if it's hosted by Microsoft or placed on Azure AI Foundary? Last time I checked harness is a client-side thing, unless OpenAI models hosted on OpenAI cloud platforms have some proprietary server-side Codex harnesses that I don't know about.

    Google opencode github copilot login. With opencode you can simply type /connect and connect via github copilot license. This should also be possible in codex imho. Most companies on enterprise level already have a github contract and you can't just change this on enterprise level if a few hundred or thousands of people are affected. The implementation for codex could simply make sure that in the model sele only openai models can be selected.

  17. vhbui02 commented on Apr 12, 2026

    @vhbui02

    @styler-ai Agreed. I'm about to maintain another fork of the Rust-based Codex CLI. An early heads-up need to be made first: I don't know Rust so everything must be done via Opus 4.6 Thinking on Antigravity. I'm gathering the necessary context (linear walkthrough of Codex CLI, any known Rust-based implementation of GitHub Copilot integration like what I found in Zed, existing up-to-date "Codex-to-GitHub-Copilot" proxies, TypeScript-based rejected PRs, known issues/limitations found on GitHub Issues, ...) to make sure everything works as expected. I will inform you when it's stable enough.

  18. trucle commented on May 20, 2026

    @trucle

    I agree, please support more subscriptions

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

    CLIIssues related to the Codex CLIauthIssues related to authentication and accountsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions