Illustration of what Clodex does: Local proxy that runs ChatGPT Codex models inside the Claude Code terminal tool

Aotricx /

Clodex

Local proxy that runs ChatGPT Codex models inside the Claude Code terminal tool

Claude Code expects to talk to Anthropic's API. Clodex sits on your machine and pretends to be that API. It rewrites each request into the format the ChatGPT Codex backend uses and sends it with your ChatGPT login.

When the backend replies, Clodex converts text, tool calls, reasoning, token counts and errors back into Anthropic's format. One shared piece of code handles streaming and buffered replies, so the client sees the same content either way.

Other Claude Code proxies route to many providers. Clodex supports only Codex, and has no API-key mode. The author argues the narrow focus makes tool calls, usage counts and errors more reliable. The README warns that the proxy has no authentication, and that using your ChatGPT credentials this way puts your account at risk.

What it does

  • Anthropic-to-Codex translation

    Claude Code talks to Clodex as it would to Anthropic. Clodex translates requests and responses, including streaming, tool calls and reasoning.

  • One-command launcher

    clodex claude reuses a running proxy or starts one on 127.0.0.1:8484. It then launches Claude Code pointed at it, with the context window set from the chosen model.

  • Model and effort selection

    Models use a slug[:effort][:fast] format, for example gpt-6-sol:high:fast. The model list is fetched live, with a built-in fallback list.

  • Reuses Codex CLI login

    clodex auth login (browser) and clodex auth device (device code) write the shared ~/.codex/auth.json that the Codex CLI also uses.

  • Retries and status endpoint

    Configurable retries, backoff and a circuit breaker handle upstream failures. A /status route shows plan, rate limits and recent call timings.

What you could build

  • Run Claude Code's terminal workflow with a GPT Codex model instead of a Claude model.
  • Point an existing Claude Code install at a local proxy using ANTHROPIC_BASE_URL.
  • Compare Codex models at different effort levels inside the same agent harness.
  • Study how the Anthropic Messages API maps onto a Responses-style protocol.
  • Count tokens offline through the local count_tokens endpoint.

Get started

Install Claude Code, then download the release binary for your platform (or build with Go 1.26+). Log in with clodex auth login, then start Claude Code through the proxy with clodex claude.

go build -o clodex ./cmd/clodex
clodex auth login
clodex claude

Commands are copied from the project's README. Read it on GitHub for the full setup.

More in Coding agents & dev tools

    ↑↓ to move, Enter to open, Esc to close