XiaoDuoYa/codex-with-chatgpt
ChatGPT thinks. Codex works. Use ChatGPT as the planning brain while keeping the Codex harness.
What it solves
It addresses the inefficiency of using expensive API tokens for high-level planning and code review in coding agents. By shifting the "thinking" (planning and reviewing) to the ChatGPT web interface (where users often have unused subscription quotas), it preserves API tokens for the actual execution of tasks.
How it works
The project creates a secure, read-only bridge between the ChatGPT web app and a local workspace. It uses a Model Context Protocol (MCP) connection via a Cloudflare Quick Tunnel and OAuth 2.1 for security.
- Control Plane: Codex and ChatGPT exchange small state messages to coordinate the workflow (Init $\rightarrow$ Plan $\rightarrow$ Executed $\rightarrow$ Review $\rightarrow$ Done).
- Data Plane: ChatGPT uses eight read-only tools to pull only the specific code and workspace information it needs, rather than having the entire repository uploaded.
- Execution: Codex retains full ownership of executing the code, while ChatGPT acts as the "brain" that plans the work and inspects the resulting git diffs and test records to verify success.
Who it’s for
Developers who use Codex coding agents and have a ChatGPT Plus/Pro subscription, wanting to reduce API costs and leverage the web UI's capabilities for planning and review.
Highlights
- Read-only by design: The bridge lacks write/delete/shell tools, preventing prompt injection from modifying the local system.
- Zero-touch installation: Includes a "Skill" that allows a coding agent to automatically install and configure the entire environment.
- Secure access: Implements OAuth 2.1 with PKCE and one-time pairing codes to ensure only authorized users can access the workspace.
- Path containment: Prevents directory traversal attacks and blocks sensitive files (like
.envfiles) from being read.
Related
- Project
- Project
- Project
- Project