Access GPT-5 Codex through your ChatGPT Plus/Pro subscription in OpenCode
Usage Notice
[!CAUTION] This plugin is for personal development use only. It uses OpenAI's official OAuth authentication (the same method as OpenAI's official Codex CLI) for individual coding assistance with your ChatGPT Plus/Pro subscription.
Not for: Commercial services, API resale, or multi-user applications. For production use, see OpenAI Platform API.
Users are responsible for compliance with OpenAI's Terms of Use.
| Guide | Description |
|---|---|
| Getting Started | Complete installation and setup |
| Configuration | Advanced config options and patterns |
| Troubleshooting | Debug techniques and common issues |
| Privacy & Data | How your data is handled |
| Release Notes | Version history |
| Guide | Description |
|---|---|
| Architecture | Technical design, request transform modes, AI SDK compatibility |
| API Contract Audit (v5.4.0) | Public API compatibility assessment, error contracts, and semver recommendation |
| Config System | Configuration loading and merging |
| Config Fields | Understanding config keys and fields |
| Testing Guide | Test scenarios and verification |
| TUI Parity Checklist | Auth dashboard/UI parity requirements |
| Audit Artifacts (2026-03-01) | Deep audit findings, IA map, naming guide, and gate evidence |
# 1. Install
npx -y oc-chatgpt-multi-auth@latest
# 2. Authenticate
opencode auth login
# 3. Use it
opencode run "Hello" --model=openai/gpt-5.2 --variant=mediumFor detailed setup, see Getting Started.
| Feature | Description |
|---|---|
| OAuth Authentication | Secure ChatGPT Plus/Pro login |
| 21 Template Presets | GPT-5.2, GPT-5 Codex, GPT-5.1 Codex Max, GPT-5.1 Codex, GPT-5.1 Codex Mini, GPT-5.1 (plus optional manual Spark IDs) |
| Variant System | Works with OpenCode v1.0.210+ variants and legacy presets |
| Multi-Account | Auto-rotation when rate-limited with workspace-aware identity persistence |
| Beginner Toolkit | codex-help, codex-setup, codex-doctor, and codex-next for onboarding + recovery |
| Interactive Pickers | codex-switch, codex-label, and codex-remove can prompt for account selection when index is omitted |
| Account Metadata | Labels, tags, and notes via codex-label, codex-tag, codex-note, plus codex-list tag="..." filtering |
| Safe Backup/Import | Timestamped exports, import dry-run preview, and pre-import backup before apply when existing accounts are present |
| Startup Preflight | One-line startup summary of healthy/blocked/rate-limited accounts with recommended next step |
| Per-Model Config | Different reasoning effort per model |
| Multi-Turn | Full conversation history with stateless backend |
| Fast Session Mode | Optional low-latency tuning for quick interactive turns |
| Comprehensive Tests | 1,700+ tests (80% coverage threshold) + integration tests |
Use your ChatGPT subscription instead of OpenAI API credits
| Benefit | Description |
|---|---|
| No separate API key | Uses ChatGPT OAuth |
| Access Codex models | Through ChatGPT Plus/Pro |
| Same auth as Codex CLI | Official OAuth flow |
| Full feature parity | With Codex CLI |
The plugin intercepts OpenCode requests and routes them through a mode-aware Codex pipeline:
OpenCode SDK Request
->
Request Transform Mode Gate
|- Native (default): keep host payload shape
|- Legacy: apply Codex compatibility rewrites
->
OAuth Token Management (auto-refresh)
->
Account + Workspace Selection (health-aware)
->
Stateless Request Contract (store: false)
->
ChatGPT Codex Backend
See Architecture and TUI Parity Checklist for technical details and UI parity criteria.
| Resource | Link |
|---|---|
| Issues | GitHub Issues |
| Releases | Release Notes |
| Repository | GitHub |
| Contributor | Role |
|---|---|
| numman-ali | Original plugin author |
| ndycode | Multi-account support and maintenance |
MIT License with Usage Disclaimer - See LICENSE for details.
Trademark Notice: Not affiliated with OpenAI. ChatGPT, GPT-5, Codex, and OpenAI are trademarks of OpenAI, L.L.C.