Last active
January 11, 2026 06:36
-
-
Save jrimmer/510f88c51048d69da581cfa19a8726ec to your computer and use it in GitHub Desktop.
Using External LLMs (Codex, Gemini) with Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When you ask Claude Code to "Have Codex review X" or "Have Gemini analyze Y", it may interpret this as a request for a generic agent task and perform the review itself. | |
| To invoke external LLM CLIs instead, add this to your `~/.claude/CLAUDE.md` (global) or project `CLAUDE.md`: | |
| ``` | |
| ## External LLMs | |
| - `codex` - OpenAI Codex CLI (`codex exec -s read-only "prompt"`) | |
| - `gemini` - Google Gemini CLI (`gemini -s "prompt"`) | |
| ``` | |
| Use these when asked to have "Codex review" or "Gemini review" something. | |
| Prerequisites: The respective CLI tools must be installed and authenticated: | |
| - Codex: npm install -g @openai/codex + OPENAI_API_KEY | |
| - Gemini: npm install -g @google/gemini-cli + GEMINI_API_KEY |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Otherwise you'll get a message along the lines of the following, saying that Claude Code will just do the review itself.
"The user wants me to have "Codex" review the WebSocket client implementation plan. I think they mean they want me to use an agent or tool to do a thorough review of the document. Let me use the Task tool with a general-purpose or Explore agent to do a comprehensive review of the implementation plan. ... Let me have it do a thorough review of the implementation plan, ..."
Yeah, that's totally what I wanted to do! 🤪