AI tips · No. 2
2026-09-25
Claude plans and reviews. Codex builds to a spec. Grok researches and argues.
Using an AI agent? Don't build this by hand. Point your agent at this page; there is a section for it at the bottom.
The problem
I pay for three AI plans: Claude, ChatGPT (for Codex) and Grok. Two of them were sitting unused, because using three agents by hand means three chats and a lot of copy and paste.
The worse problem shows up once they are doing real work. Every agent checks its own work and tells you it passed.
The split
Claude Code is the foreman: it writes the spec, sends the work out, and reviews what comes back. The other two are crew, called headless from Claude's own shell. Work is routed by what it is, not by what is cheapest:
codex exec --sandbox workspace-write --skip-git-repo-check \
"$(cat task.md)" < /dev/null > codex.log 2>&1
grok -p "$(cat task.md)" --cwd ~/projects/farm \
--tools read_file,grep,list_dir --output-format json
A bonus: Grok Build reads the same CLAUDE.md files Claude Code does, so the
rules I write down once reach both agents.
Every call
A worker call goes out with six things, or it doesn't go out:
The review
The review is the whole point of the split. Across eight batches of 3D models the workers handed back a French cleat with its bevel upside down, a joint that was really a T-slot, six models missing a required field, and fifteen files leaking brand names onto public pages. Every one of them passed the worker's own self-check. Claude caught them, by running the checks itself and looking at a render of every model.
The order of escalation: Grok tries first, on everything and in parallel, because it is cheap. Codex gets only what Grok couldn't fix, one at a time. The most expensive model sees only what both failed, and only after I say yes.
What bit
Reading additional input from stdin... and waits. Always redirect
< /dev/null. It looks exactly like a slow model.max turns reached, an error about turns
and not tools.The result
All three plans do real work now, and I talk to one agent. A batch of models went from 32 minutes to 12 once the spec got strict: an acceptance test of exactly three commands, one file per model, a short header, and a normal reasoning setting instead of a higher one. A Grok consult runs from under two cents for a lookup to about twenty for a hard read of real files. Nothing a worker writes reaches a public page until Claude has checked it.
For your AI agent
Anyone with an AI agent will just tell it to read this and set it up, so this part is written for the agent. Paste something like this into Claude Code:
Read https://jacobkunselman.com/tips/claude-orchestrates-codex-and-grok/agent.md
and set up the same split on my machine: the Grok bridge, the Codex call, and the
routing rules in my CLAUDE.md. Test each worker with one small task.
agent.md is the plain-text spec: the routing rules to drop into
CLAUDE.md, the six-part worker call as a template, the two headless
invocations, the review gate, and acceptance tests. The reference files:
CLAUDE.md