XiaoDuoYa/codex-with-chatgpt
ChatGPT thinks. Codex works. Use ChatGPT as the planning brain while keeping the Codex harness.
Codex with ChatGPT – What it is
Codex with ChatGPT is a bridge that lets the official ChatGPT web UI act as the thinking (planning, reviewing) part of a coding‑assistant workflow while the Codex agent does the actual code execution. It does not require an OpenAI API key – the ChatGPT side runs in a normal browser session, and a tiny read‑only MCP (Microsoft Code Protocol‑style) bridge forwards only the few lines of code that the model needs to see.
Why it exists
- ChatGPT Plus/Pro web subscriptions give you a lot of unused quota, while Codex‑based agents consume scarce API tokens for planning and review.
- This tool swaps the “thinking” to the paid‑for web UI and keeps the execution on Codex, saving API usage.
- It works without uploading your repository: ChatGPT reads files through a secure, OAuth‑protected, read‑only bridge.
How you get it running (one‑paste install)
- Prerequisites – git, Node ≥ 20, and
cloudflared(installed automatically via Homebrew on macOS or winget on Windows). - Clone & build –
git clone https://github.com/XiaoDuoYa/codex-with-chatgpt ~/codex-with-chatgpt && cd ~/codex-with-chatgpt && corepack pnpm install && corepack pnpm build. - Install the Codex Skill – copy
skill/SKILL.mdinto your Codex skill directory ($CODEX_HOME/skills/codex-with-chatgpt/). - First‑time setup – run
c2c setup. A built‑in browser opens, you log into ChatGPT, pair the session with a short code, and (optionally) link a Cloudflare tunnel for a stable hostname. - Use – tell Codex “Set up Codex with ChatGPT” and then “Use Codex with ChatGPT to implement …”.
The whole flow is designed to be automated; a non‑technical user can just paste the block above and let the agent do the rest.
Core architecture (simplified)
ChatGPT Web UI ←→ C2C Bridge (loopback HTTP + Cloudflare tunnel)
▲ ▲
│ read‑only MCP (10 tools) │
│ │
└─> Local workspace ←─ Codex harness (executes, runs tests)
- Control plane – tiny
[C2C]messages (INIT → PLAN → EXECUTED → REVIEW → DONE). - Data plane (MCP) – read‑only tools such as
list_directory,read_file,git_status,test_status, etc. - Security – OAuth 2.1 with PKCE, one‑time pairing code, path containment, and a default deny list for secrets (
.env*, keys, etc.).
What you can do with it
- Plan – ask ChatGPT to design a feature; it can inspect the current repo via the read‑only tools.
- Execute – Codex runs the generated code, commits, runs tests.
- Review – after execution, ChatGPT reads the actual git diff and test results to give an independent review.
- Asset handling – read‑only image/video inspection; you can import verified assets with
c2c asset import.
Limitations & status
- Read‑only: the bridge never writes to your files; all modifications come from Codex.
- Unofficial: community project, not endorsed by OpenAI.
- V1: end‑to‑end verified, but still early – expect occasional bugs; the skill auto‑updates daily.
License
MIT – you can freely use, modify, and redistribute.
In short: Codex with ChatGPT lets you keep the cheap, quota‑free ChatGPT web UI as the brain of your coding assistant while Codex does the heavy lifting, all behind a secure, read‑only bridge that protects your code and credentials.*
Related
- Project
- Project
- Project
- Project
- Project