Two AI models enter. Better code leaves.
Bridge between oh-my-claudecode and OpenAI Codex — each model handles what it's best at, with automatic cross-model fallback when either is unavailable.
Claude and Codex each have distinct strengths. This plugin assigns each model to the role it excels at and automatically falls back when either is unavailable:
| Role | Primary | Fallback |
|---|---|---|
| Planning & architecture | Claude (deep reasoning) | Codex |
| Complex implementation | Claude ralph (multi-file context) | Codex rescue --write |
| Structured code review | Codex (fast, JSON output) | Claude code-reviewer |
| Adversarial review | Codex (skeptical stance) | Claude architect |
| Quick scoped fixes | Codex (sandboxed, fast) | Claude ralph |
| Synthesis & decisions | Claude (prioritization) | Codex task |
When Claude hits rate limits, quota, or any error → Codex takes over automatically. When Codex is unavailable → Claude agents cover all roles. Work never stalls.
# The complete forge: plan → blind TDD → build → stress harden → review → ship
/omcx:forge implement payment processing with refund support
# Quick feature with full cross-model pipeline
/omcx:pipeline implement user notification system with email and slack
# Claude grinds + Codex validates in a loop until both agree
/omcx:auto-ralph fix all TypeScript errors and make tests pass
# 3 Claude agents + 2 Codex agents build in parallel
/omcx:team 3:claude:executor,2:codex implement the entire auth subsystem
# Adversarial hardening: Codex attacks, Claude defends
/omcx:stress src/payment/processor.tsOne-liner install:
curl -fsSL https://raw.githubusercontent.com/jhcdev/omc-codex/main/install.sh | bashThis automatically:
- Clones the plugin to
~/.claude/plugins/marketplaces/omc-codex - Configures
~/.claude/settings.json - Checks Node.js, Codex CLI, and auth status
- Re-running updates to the latest version
Then in Claude Code:
# 1. Reload plugins
/reload-plugins
# 2. (Optional) Install & auth Codex CLI for full cross-model power
npm install -g @openai/codex && codex login
# 3. Run your first forge:
/omcx:forge add search feature to the APIManual install
# 1. Clone the plugin
git clone https://github.com/jhcdev/omc-codex.git ~/.claude/plugins/marketplaces/omc-codex
# 2. Add to ~/.claude/settings.json (see Configuration below)
# 3. Install Codex CLI & authenticate (optional)
npm install -g @openai/codex
codex login
# 4. Reload in Claude Code
/reload-plugins🧠 Claude planned the search architecture
🧪 Codex wrote tests from spec (blind — never saw Claude's plan)
🔨 Claude built the feature from tests (blind — tests were the spec)
⚔️ Codex tried to break it with adversarial inputs
🛡️ Claude fixed every vulnerability Codex found
🔍 Codex gave a final structured review
📊 Result: battle-tested code verified by two AI model families
Add to ~/.claude/settings.json:
{
"enabledPlugins": {
"omcx@omc-codex": true
},
"extraKnownMarketplaces": {
"omc-codex": {
"source": {
"source": "url",
"url": "https://raw.githubusercontent.com/jhcdev/omc-codex/main/.claude-plugin/marketplace.json"
}
}
}
}| Tool | Required | Notes |
|---|---|---|
| Node.js >= 18.18 | Yes | Runtime |
| Claude Code v2.1+ | Yes | Host environment |
| oh-my-claudecode | Yes | Core orchestration layer |
Codex CLI (@openai/codex) |
Optional | Falls back to Claude agents if missing |
Each model is assigned to phases where it performs best:
- Planning: Handles ambiguous requirements, designs architecture with deep reasoning
- Complex implementation: Multi-file changes with full codebase context (ralph loop)
- Debugging: Reasoning chains for root-cause analysis
- Synthesis: Merges multiple review reports, prioritizes by real-world impact
- Structured review: Fast scan with consistent JSON output (severity/file/line)
- Adversarial review: Skeptical stance, finds edge cases and failure modes
- Quick fixes: Sandboxed, fast execution for well-scoped changes (1-2 files)
- Cross-model validation: Different perspective catches blind spots
When one model is unavailable, the other covers all roles:
| Situation | Behavior |
|---|---|
| Claude rate-limited | Codex takes over build/plan/fix with --write |
| Claude quota exhausted | Same — Codex continues all work |
| Claude context limit | Codex takes over remaining steps |
| Codex not installed | Claude agents handle review/validation |
| Codex auth failure | Claude code-reviewer + architect agents |
| Codex ENOBUFS/timeout | Claude agents as fallback reviewers |
| Both unavailable | Stop and report — manual intervention needed |
Non-git directory support: Codex adversarial review works in any directory, not just git repos. It walks the file tree and reviews all source files directly.
The core of this plugin. Each command automatically chains the right model to the right phase.
Plan → build → test → review → fix. Idea to working, reviewed code in one command.
/omcx:pipeline implement user notification system with email and slack
/omcx:pipeline add rate limiting to all public API endpoints
/omcx:pipeline migrate payment module from Stripe v2 to v3What happens:
- Claude Opus plans the architecture (→ Codex if Claude unavailable)
- Claude ralph implements the plan (→ Codex rescue --write if rate-limited)
- Codex runs structured + adversarial review (→ Claude agents if Codex unavailable)
- Fixes route by complexity: simple → Codex, complex → Claude
- Reports final summary with which model handled each phase
Claude builds, Codex validates. Keeps going until both models agree the work is done.
/omcx:auto-ralph fix all TypeScript errors and make tests pass
/omcx:auto-ralph implement retry logic for all API calls
/omcx:auto-ralph refactor the auth module to use JWTWhat happens:
- Claude ralph grinds on the task (→ Codex --write if Claude unavailable)
- When build completes → Codex reviews automatically
- Critical findings → route back: complex to Claude, simple to Codex
- Repeats until both are satisfied (max 5 cycles)
Claude designs and builds, Codex reviews, auto-fix cycle.
/omcx:auto-plan add refund feature to payment system
/omcx:auto-plan implement search API with elasticsearch
/omcx:auto-plan build admin dashboard for user managementWhat happens:
- Claude Opus designs the architecture (→ Codex if unavailable)
- Claude ralph implements the plan (→ Codex --write if unavailable)
- Codex runs structured review (→ Claude code-reviewer if unavailable)
- Auto-fixes review findings, routing by complexity (max 3 cycles)
Two Codex reviews + Claude synthesis into prioritized action plan.
/omcx:auto-validate
/omcx:auto-validate auth flow and session handling
/omcx:auto-validate database query performanceWhat happens:
- Codex structured review — implementation bugs (→ Claude code-reviewer)
- Codex adversarial review — design weaknesses (→ Claude architect)
- Claude synthesizes both into fix-now / fix-later priorities (→ Codex if unavailable)
- Offers auto-fix, manual fix, or ralph fix
Scale Claude and Codex agents independently. Each handles tasks matching its strength.
/omcx:team 3:claude:executor,2:codex implement auth with OAuth2, JWT, RBAC
/omcx:team 2:claude,1:codex add pagination and caching
/omcx:team 1:claude:designer,2:claude:executor,2:codex build admin dashboard
/omcx:team 5:codex add JSDoc to all exported functionsWhat happens:
- Plan decomposes task and tags each subtask: complex → Claude, scoped → Codex
- Claude agents and Codex agents build in parallel, each on their assigned tasks
- Cross-model review: Codex reviews Claude's code, Claude reviews Codex's code
- Findings route back to the appropriate model for fixes (max 3 cycles)
Why this matters: Complex work goes to Claude (multi-file reasoning). Independent scoped tasks go to Codex (fast, sandboxed). Cross-model review catches blind spots that same-model review misses.
N Claude agents vs M Codex agents solve the same task independently. Compare all results.
/omcx:race 2:claude,2:codex implement rate limiter with sliding window
/omcx:race 3:claude,1:codex design the caching architecture
/omcx:race 1:claude,3:codex add error handling to all API routes
/omcx:race implement search with fuzzy matching # default: 1 vs 1What happens:
- All N+M racers implement the same task in parallel (isolated environments)
- Claude compares all results in a tournament-style comparison
- User chooses: apply winner, merge best of all, or view all diffs
- The model that didn't produce the winner reviews it (cross-model safety net)
When to use: Critical code, multiple valid approaches, or when you want maximum solution diversity. All racers run in parallel — wall time ≈ slowest single racer.
One command, every omcx advantage. Plan → blind TDD → build → stress harden → review → ship.
/omcx:forge implement payment processing with refund support
/omcx:forge --thorough implement JWT token rotation with refresh flow
/omcx:forge --quick add rate limiting to API endpoints
/omcx:forge --test-writers 3 --stress-rounds 7 --attackers 3 implement ledger reconciliationThe full pipeline:
┌─────────────────────────────────────────────────────────────────┐
│ /omcx:forge implement payment processing with refund support │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Phase 1 🧠 Claude PLANS deep reasoning → architecture │
│ ↓ clean spec (no impl hints) │
│ Phase 2 🧪 Codex writes TESTS blind — spec only, no code │
│ ↓ test files (the contract) │
│ Phase 3 🔨 Claude BUILDS blind — tests only, no spec │
│ ↓ implementation │
│ Phase 4 ⚔️ Codex ATTACKS adversarial stress testing │
│ 🛡️ Claude DEFENDS fix vulnerabilities │
│ ↓ hardened code (repeat until unbreakable) │
│ Phase 5 🔍 Codex REVIEWS structured + adversarial │
│ ↓ final fixes │
│ Phase 6 📊 Claude SYNTHESIZES confidence report │
│ │
│ Every phase: different model challenges the other's work │
│ Result: code verified by two independent AI model families │
│ │
├─────────────────────────────────────────────────────────────────┤
│ Combines: blind-test + stress + pipeline + auto-validate │
│ Presets: --quick | (default) | --thorough │
│ Scale: --test-writers N --attackers N --builders N:M │
└─────────────────────────────────────────────────────────────────┘
At every stage, a different model challenges the other's work. The code survives because it passed scrutiny from two independent AI model families. No single-model system can produce this level of confidence.
| Preset | Speed | Use Case |
|---|---|---|
--quick |
Fast | Simple features |
| (default) | Standard | Most features |
--thorough |
Deep | Security-critical, financial code |
One model writes tests from spec only, the other implements from tests only. They can't share blind spots.
/omcx:blind-test implement rate limiter that handles burst traffic
/omcx:blind-test --swap implement input validation for user registration
/omcx:blind-test --test-writers 3 implement payment processing pipelineWhat happens:
- Claude extracts a clean spec (no implementation hints)
- Codex writes tests from spec only (doesn't know how it'll be built)
- Claude implements from tests only (tests ARE the spec)
- Run tests — failures reveal blind spot differences between models
- Fix → retest → adversarial hardening until robust
Why this is unique: Same-model TDD shares blind spots (tests don't test what code won't handle). Cross-model TDD forces genuinely independent perspectives.
Codex attacks your code (adversarial tests), Claude defends (fixes). Iterative hardening.
/omcx:stress src/auth/middleware.ts
/omcx:stress --focus concurrency src/cache/connection-pool.ts
/omcx:stress --attackers 3 --rounds 5 src/payment/processor.tsWhat happens:
- Claude analyzes attack surface (entry points, weak spots)
- Codex (red team) writes adversarial tests trying to crash/break the code
- Claude (blue team) fixes each vulnerability
- Codex escalates — tries harder each round
- Ends when red team can't break it anymore (or max rounds)
- All adversarial tests become permanent regression tests
Attack categories: Boundary, concurrency, resource exhaustion, security (injection, auth bypass), state corruption, timing, malformed data.
Both /omcx:team and /omcx:race support N:model[:type] syntax:
# Team: Claude builds complex, Codex builds simple, cross-model review
/omcx:team 3:claude:executor,2:codex implement full auth system
# Race: 2 Claude vs 2 Codex compete, compare 4 solutions
/omcx:race 2:claude,2:codex implement rate limiter| Spec | Meaning |
|---|---|
3:claude:executor |
3 Claude agents, executor type |
2:codex |
2 Codex workers (write-capable) |
1:claude:designer |
1 Claude agent, designer type |
3:codex:spark |
3 Codex workers, spark model |
Scaling guidelines:
| Pattern | Config | Use Case |
|---|---|---|
| Standard team | 3:claude,2:codex |
Feature work — Claude builds, Codex validates |
| Build-heavy | 4:claude,1:codex |
Complex interconnected work |
| Review-heavy | 1:claude,4:codex |
Many independent validations |
| Classic race | 1:claude,1:codex |
Two perspectives, head-to-head |
| Tournament | 3:claude,3:codex |
Maximum solution diversity |
| What you need | Command | Example |
|---|---|---|
| Build a feature end-to-end | /omcx:pipeline |
/omcx:pipeline add OAuth2 login |
| Fix something + validate | /omcx:auto-ralph |
/omcx:auto-ralph fix failing tests |
| Design + implement + review | /omcx:auto-plan |
/omcx:auto-plan add caching layer |
| Quality check after work | /omcx:auto-validate |
/omcx:auto-validate |
| Mixed-model team build | /omcx:team |
/omcx:team 3:claude,2:codex add auth |
| Multi-agent competition | /omcx:race |
/omcx:race 2:claude,2:codex rate limiter |
| All-in-one forge | /omcx:forge |
/omcx:forge implement payment system |
| Cross-model TDD | /omcx:blind-test |
/omcx:blind-test implement auth middleware |
| Adversarial hardening | /omcx:stress |
/omcx:stress src/auth/ |
For fine-grained control, use individual commands and chain them yourself.
/omcx:review --wait # Structured review (foreground)
/omcx:review --background # Run in background
/omcx:review --base main # Compare against branch
/omcx:review --scope working-tree # Uncommitted changes only
/omcx:adversarial-review --wait # Challenge design assumptions
/omcx:adversarial-review --wait auth flow and session handlingNote: /omcx:adversarial-review works in non-git directories too — it scans files directly.
/omcx:rescue --write <task> # Delegate with write access
/omcx:rescue <question> # Read-only investigation
/omcx:rescue --resume <follow-up> # Continue previous thread
/omcx:rescue --fresh <task> # Force new thread
/omcx:rescue --background --write <task>/omcx:setup # Check CLI status + auth
/omcx:setup --enable-review-gate # Auto-review on session end
/omcx:setup --disable-review-gate # Disable auto-review/omcx:status # List jobs
/omcx:result # Latest result
/omcx:cancel # Cancel running jobChain omc skills with omcx commands for custom workflows.
/oh-my-claudecode:plan "add refund feature"
/omcx:rescue --write implement refund feature per the plan above
/omcx:review --wait
/omcx:rescue --resume fix the issues from the review/omcx:rescue --write implement caching layer with Redis
/oh-my-claudecode:ralph "make all caching tests pass"/omcx:review --background
/oh-my-claudecode:team 2:executor "refactor module A, test module B"
/omcx:result/omcx:setup --enable-review-gate
/oh-my-claudecode:deep-dive "why is API response > 3 seconds"
/omcx:rescue --write optimize the N+1 query
# Review gate fires on session end┌──────────────────────────────────────────────────────┐
│ Claude Code Session │
│ │
│ ┌───────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Claude │ │ omcx │ │ Codex CLI │ │
│ │ (builder) │ │ (router) │ │ (validator) │ │
│ │ │ │ │ │ │ │
│ │ plan ─────┼──┼→ pipeline ───┼──┼→ review │ │
│ │ ralph ────┼──┼→ auto-ralph ─┼──┼→ validate │ │
│ │ ultrawork │ │ auto-plan ──┼──┼→ adversarial │ │
│ │ architect │ │ auto-val ───┼──┼→ challenge │ │
│ │ │ │ │ │ │ │
│ │ ◄─────────┼──┼─ fallback ◄──┼──┼─ fallback │ │
│ │ (covers │ │ (routes to │ │ (covers │ │
│ │ Codex │ │ available │ │ Claude │ │
│ │ roles) │ │ model) │ │ roles) │ │
│ └───────────┘ └──────────────┘ └──────────────┘ │
└──────────────────────────────────────────────────────┘
| Capability | omc only | omc + omcx |
|---|---|---|
| Role routing | Single model | Strength-based: Claude builds, Codex reviews |
| Code review | Claude text review | Codex structured JSON (severity/file/line) |
| Design validation | Manual prompting | Adversarial review with dedicated prompts |
| Review enforcement | None | Stop-time review gate (BLOCK/ALLOW) |
| Rate limit handling | Session stops | Auto-fallback to Codex — work continues |
| Cross-model validation | N/A | Two different models checking same code |
| Non-git review | N/A | Directory-based file scan for any project |
| Auto-chaining | Manual multi-step | One command: pipeline, auto-ralph, auto-plan |
| Failure handling | N/A | Bidirectional fallback: Claude ↔ Codex |
omc-codex/
├── .claude-plugin/ # Plugin + marketplace metadata
├── commands/ # /omcx:* commands
│ ├── pipeline.md # Full autonomous pipeline
│ ├── auto-ralph.md # Ralph + Codex review loop
│ ├── auto-plan.md # Plan → build → review → fix
│ ├── auto-validate.md # Dual review + synthesis
│ ├── review.md # Structured code review
│ ├── adversarial-review.md # Adversarial review
│ ├── team.md # Team build + Codex verification
│ ├── race.md # Dual-model parallel execution
│ ├── forge.md # Complete cross-model forge
│ ├── blind-test.md # Cross-model TDD
│ ├── stress.md # Red team vs blue team
│ ├── rescue.md # Task delegation
│ ├── setup.md # Setup & review gate
│ ├── status.md # Job status
│ ├── result.md # Job results
│ └── cancel.md # Cancel jobs
├── agents/codex-rescue.md # Codex forwarding agent
├── skills/ # Runtime, result handling, prompting
├── hooks/hooks.json # Session lifecycle + review gate
├── scripts/ # codex-companion runtime + lib
├── prompts/ # Review prompt templates
├── schemas/ # Review output JSON schema
└── README.md
MIT — See LICENSE for details.
Based on openai/codex-plugin-cc by OpenAI. Designed to work with oh-my-claudecode.