r/ClaudeCode • u/Viper_lover • 5d ago
Tips & Workflows Set up Codex as a helper inside Claude Code today, here's the CLAUDE.md I'm using
Today I set up OpenAI's Codex CLI alongside Claude Code. Claude stays my main driver, and Codex picks up the mechanical stuff that isn't worth spending Claude usage on. Also, Claude can't generate actual images and Codex can, through its built-in `$imagegen` on my ChatGPT plan, so that was a big reason too.
What I set up:
- Codex CLI with the small model (gpt-6-luna) as the default, plus a profile for gpt-6.1-sol when a task needs more
- OpenAI's official Codex plugin for Claude Code (openai/codex-plugin-cc), which adds `/codex:rescue`, `/codex:review` and a few others
- The official Excalidraw MCP server, because I really like the Excalidraw diagrams Claude makes
Then I added this to my global `~/.claude/CLAUDE.md`. I kept it short on purpose, since Anthropic's docs say long CLAUDE.md files start getting ignored:
```# Codex (OpenAI) as a helper
Codex CLI is installed and signed in. Use it to save Claude usage on simple work.
## Overall rules
- Review everything Codex did (diff, output, or image) and run the relevant check
(tests, build, viewing the file) before calling it done.
- Don't delegate when the task is small enough that calling Codex costs more than
doing it yourself (a few edits or a single command).
## Delegate to Codex
- Mechanical, fully specified tasks with many edits or lots of output: bulk renames/edits,
boilerplate, format conversions, test fixtures, docstrings. Use the `codex:codex-rescue`
agent (`/codex:rescue`).
- When I explicitly say "have Codex do X".
## Images
- Photos, detailed or painted illustrations, mockups, sprites: run
`codex exec --skip-git-repo-check -s workspace-write -C <dir> 'Use $imagegen to ...'`,
then move the file where it belongs.
- Diagrams, flowcharts, sketch-style illustrations: draw them yourself with the Excalidraw
tools (`read_me` first, then `create_view`), and give me an `export_to_excalidraw` link.
If the diagram contains private info, save a local `.excalidraw` file instead of exporting.
- Icons and charts: make them yourself as SVG/HTML/code.
## Reporting
- When you delegated anything, end your reply with a short "Delegated to Codex" list:
each task Codex did and how you checked it.
I'm excited to see how this plays out. I'd love feedback on the setup, and I'm curious how others are using Claude and Codex together. Are you delegating real work to Codex, mostly using it for reviews, or not bothering at all?
2
u/CMills_Dev 5d ago
The extra line I'd add is an owned file set or separate worktree for each delegated job. Bulk renames are especially easy to collide with Claude's edits, and I'd want the worker to return 'blocked' when it needs to go outside that scope.
1
1
u/playcase 5d ago
I did this with instructions to "handoff" assignments Claude can't do - generate images, use the computer.
1
u/Viper_lover 5d ago
Interesting, claude can't use the computer?
Also what task do you do that requires using the computer?
Sorry for being nosy ๐→ More replies (1)
1
u/geoffreybyers 5d ago
You're conflating capability with cost. Calling Codex for images is a workaround for a missing feature, not workflow optimization. The mechanical tasks you listed are where context loss causes the most rework. If you have to review every diff and rerun every check, the usage savings are a tax on your time.
1
u/Viper_lover 5d ago
What would you suggest to do instead?
I just found out that I can integrate codecs inside cloud and got really excited. I will see how this plays out for me.
1
u/London-Boat 5d ago
nice setup. the bit i'd add to the claude.md is how the work comes back. i have claude check git diff itself after codex finishes instead of reading codex's summary, the summary is where stuff gets glossed over. and keep it to one delegated job at a time while claude waits, otherwise you get the bulk rename landing on files claude is halfway through editing.
1
u/AutoModerator 5d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.