Run Claude Code on GPT-5.6 (Sol) through your existing Codex subscription, with effort switching in the /model picker. Your normal claude setup stays untouched.
Select model
1. Default (recommended) Use the default model (currently gpt-5.6-sol[1m])
❯ 2. gpt-5.6-sol ✔ Custom Opus model
3. gpt-5.6-sol Custom Sonnet model
4. gpt-5.6-luna Custom Haiku model
● High effort (default) ←/→ to adjust
This packages the setup shared by @thsottiaux (Codex lead at OpenAI) and @theo, plus the fix for the part that silently breaks if you are logged into a Claude subscription.
If you are logged into Claude Code with a Pro/Max subscription, the recipe from the tweets returns 401 Invalid API key on every request. Claude Code (verified on 2.1.207) sends its own stored OAuth bearer token and ignores ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY entirely. A header capture against a local listener shows it plainly:
{"/v1/messages?beta=true": {"authorization": "Bearer sk-ant-[redacted]"}} <- its OAuth token
not your proxy key
The fix is to give claudex its own CLAUDE_CONFIG_DIR. With no stored OAuth credentials in that profile, ANTHROPIC_AUTH_TOKEN is used, and your logged-in claude keeps working normally next to it.
Side effect worth knowing: the claudex profile does not load your global ~/.claude/CLAUDE.md, settings, or history. First run asks you to trust the folder once.
git clone https://github.com/victorv2i/claudex
cd claudex
./install.shThen open a new shell and run claudex.
Or skip all of that: paste this repo's URL into Claude Code and say "set this up". The README and scripts have everything it needs.
The installer:
- downloads the latest CLIProxyAPI release to
~/.local/opt/cliproxyapi - writes a loopback-only config (
127.0.0.1:8317) with a generated API key - installs and starts a
cliproxyapisystemd user service - reuses your existing
codex logincredentials (see below), or tells you how to log in - installs the
claudexshell function
Everything is local. Nothing listens beyond loopback and no telemetry is added.
If you already use the Codex CLI, ~/.codex/auth.json holds OAuth tokens for the same client id CLIProxyAPI uses. convert-codex-auth.py rewrites them into CLIProxyAPI's auth file format, refresh token included, so the proxy works immediately without another browser dance. The installer does this automatically.
CLAUDE_CODE_ALWAYS_ENABLE_EFFORT=1 enables Claude Code's effort selector for non-Anthropic models. It shows up in /model (arrow keys to adjust) and the proxy translates the thinking budget into OpenAI's reasoning.effort. The model slots map Opus and Sonnet to gpt-5.6-sol and Haiku to gpt-5.6-luna so background calls stay cheap.
If you drive this box over SSH:
tmux new -A -s claudex
claudexDetach with ctrl-b d, reattach from any device with the same command.
systemctl --user disable --now cliproxyapi
rm -rf ~/.local/opt/cliproxyapi ~/.config/cliproxyapi ~/.cli-proxy-api \
~/.config/systemd/user/cliproxyapi.service ~/.claude-claudex \
~/.bashrc.d/claudex.sh ~/.claudex.sh
systemctl --user daemon-reloadIf the installer told you to add source ~/.claudex.sh to your shell rc, remove that line too.
- This routes your Codex subscription through a local third-party proxy. That is a gray zone in OpenAI's terms; the Codex lead's take was "if this gets blocked, I owe you a reset". Use your own judgment.
- Claude Code's auth precedence around
ANTHROPIC_AUTH_TOKENhas changed between versions and platforms (#34826 documents the opposite behavior). The separate-config-dir approach sidesteps precedence entirely, which is why claudex uses it. - Tested on Linux with Claude Code 2.1.207 and CLIProxyAPI 7.2.71. The installer refuses macOS for now since the service step needs systemd; the pieces would work under launchd if someone wants to port it (PRs welcome).
MIT