# Can I use my ChatGPT plan with the Codex CLI?

*Updated 6 November 2026. Canonical: https://zoltbot.ai/answers/chatgpt-plan-with-codex-cli*

**Short answer:** Yes. Run `codex`, choose Sign in with ChatGPT, and the CLI uses your plan's Codex allowance; the CLI is included from ChatGPT Plus at $20 a month. You can sign in with an OpenAI API key instead, which bills at API rates and leaves out Codex's cloud features.

## How to sign in

1. Install the CLI, for example with `npm install -g @openai/codex` or `brew install --cask codex`.
2. Open a project folder and run `codex`.
3. Choose **Sign in with ChatGPT**. A browser window opens, and after you sign in it returns your credentials to Codex.

## Plan or API key?

Signing in with ChatGPT uses your subscription. On Plus, OpenAI estimates 15 to 160 local messages per 5 hours with GPT-6.1 Sol, and Pro has no five-hour limit. When you hit a limit, Plus and Pro users can buy credits, or run extra local chats with an API key at standard API rates.

An API key fits CI and shared automation. It bills per token, model choice follows what your key can use, and it has no cloud features such as GitHub code review or Slack.

## In Zoltbot

Zoltbot runs Codex through its own CLI with the login you already have, so your ChatGPT plan covers Codex chats and tasks in every project. Zoltbot never asks for your password or copies your credentials.

## Sources

Checked on 6 November 2026.

- [Codex: CLI](https://learn.chatgpt.com/docs/codex/cli)
- [Codex: Authentication](https://learn.chatgpt.com/docs/auth)
- [Codex: Pricing and usage limits](https://learn.chatgpt.com/docs/pricing)

## Related

- [Claude Code vs Codex](https://zoltbot.ai/compare/claude-code-vs-codex)
- [What coding agents cost: Claude Code, Codex, Cursor and API usage](https://zoltbot.ai/guides/coding-agent-costs)
- [Can I use my Claude subscription with multiple coding agents?](https://zoltbot.ai/answers/claude-subscription-with-multiple-agents)
