🤖 OMX Multi-Model Scheduling Guide: Claude vs Codex
Version: v1.0 | Updated: 2026-04-30
Detailed explanation of the selection and scheduling strategies for Claude and Codex dual engines in OMX
📐 1. Architecture Overview
1.1 Dual Engine Architecture Diagram
┌──────────────────────────────────────────────────────────────┐
│ 🎯 OMX 编排层 │
│ 任务调度 + 状态管理 │
└──────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────┐
│ 🟢 Codex 引擎 │ ◄► │ 🟠 Claude 引擎 │
│ │ 协作 │ │
│ 主运行环境 │ │ 外部调用 │
│ gpt-5.5 │ │ Claude CLI │
│ │ │ │
│ ✅ 可修改文件 │ │ ❌ 仅只读分析 │
│ ✅ 运行测试 │ │ ✅ 外部知识库 │
│ ✅ Team 并行 │ │ ✅ 最佳实践 │
│ │ │ │
│ omx │ │ omx ask claude │
│ omx team N:agent │ │ --agent-prompt │
└─────────────────────┘ └─────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 🤖 Agents 层 │
│ executor | debugger | architect │
│ explore | designer | test-engineer │
│ (每个 Agent 可配置不同模型和推理深度) │
└─────────────────────────────────────────┘
⚖️ 2. Core Differences Comparison
| Dimension |
🟢 Codex |
🟠 Claude |
| Run Mode |
OMX default primary environment, continuous session |
External call, single Q&A |
| File Operations |
✅ Read, write, modify, delete |
❌ Read-only analysis |
| Command Execution |
✅ Run tests, build |
❌ Cannot execute |
| Parallelism |
✅ Team mode multiple workers |
Single call |
| Knowledge Scope |
Deep codebase understanding |
✅ External docs, best practices |
| Reasoning Depth |
Configurable reasoning effort |
Fixed capability |
| Start Command |
omx or omx team |
omx ask claude |
🎯 3. Task Routing Decision Flow
用户任务输入
↓
┌────────────────┐
│ 🤔 是否需要修改代码?│
└────────────────┘
↓
┌────────────────┴────────────────┐
│ │
▼ ▼
┌────────┐ ┌────────┐
│是:需要 │ │否:只读 │
│ 修改 │ │ 分析 │
└────────┘ └────────┘
│ │
▼ ▼
🟢 Codex 引擎 🟠 Claude 引擎
│ │
┌────┴────┐ ┌────┴────┐
│ │ │ │
▼ ▼ ▼ ▼
单文件 多文件并行 架构分析 代码审查
executor omx team architect code-reviewer
📊 Scenario Decision Table
| Scenario |
Recommended Engine |
Agent |
Command |
| 🟢 Implement new feature |
Codex |
executor |
omx team N:executor |
| 🟢 Bug debugging and fix |
Codex |
debugger |
omx --agent debugger |
| 🟢 Write tests |
Codex |
test-engineer |
omx --agent test-engineer |
| 🟠 Architecture analysis |
Claude |
architect |
omx ask claude --agent-prompt=architect |
| 🟠 Code review |
Claude |
code-reviewer |
omx ask claude --agent-prompt=code-reviewer |
| 🟠 External documentation lookup |
Claude |
researcher |
omx ask claude --agent-prompt=researcher |
| 🟢 Frontend UI design |
Codex |
designer |
omx team N:designer |
| 🟠 Design review |
Claude |
critic |
omx ask claude --agent-prompt=critic |
🔧 4. Codex Engine Detailed Explanation
4.1 Startup Methods
| Mode |
Command |
Purpose |
| Basic session |
omx |
Single developer |
| High reasoning mode |
omx --high / omx --xhigh |
Complex tasks |
| Team parallel |
omx team 3:executor "task" |
Multi-module parallel |
| Spark fast |
omx --spark |
Rapid iteration |
| Worktree isolation |
omx -w |
Independent branch |
4.2 Agent Types and Complexity
| Agent |
🎯 Applicable Scenario |
📊 Complexity |
💡 Reasoning Suggestion |
explore |
Code search, structure mapping |
🟢 Low |
low / spark |
executor |
Feature implementation, refactoring |
🟡 Medium |
medium |
debugger |
Bug investigation, root cause analysis |
🟡 Medium |
medium → high |
architect |
Architecture design, trade-off decisions |
🔴 High |
high / xhigh |
test-engineer |
Test writing, verification |
🟡 Medium |
medium |
designer |
Frontend UI/UX implementation |
🟡 Medium |
medium |
verifier |
Completion verification, evidence gathering |
🟢 Low |
low |
4.3 Team Mode Detailed Explanation
用户任务
↓
omx team N:agent "description"
↓
┌─────────────────────────────────────┐
│ 🎯 Leader (tmux 主 pane) │
│ - 任务分发 │
│ - 结果整合 │
│ - 最终验证 │
└─────────────────────────────────────┘
↓ 分发
┌──────────┬──────────┬──────────┬──────────┐
│ Worker 1 │ Worker 2 │ Worker 3 │ Worker N │
│(独立 │(独立 │(独立 │(独立 │
│worktree) │worktree) │worktree) │worktree) │
│ executor │ debugger │ designer │ test-eng │
└──────────┴──────────┴──────────┴──────────┘
↓ 各自完成
↓
Leader 整合 + 验证
↓
omx team await / shutdown
Team Command Quick Reference
| Command |
Description |
omx team N:agent "task" |
Start N workers of specified type |
omx team status team-name |
View team running status |
omx team await team-name |
Wait for all workers to complete |
omx team resume team-name |
Resume interrupted team |
omx team shutdown team-name |
Shut down team |
🟠 5. Claude Engine Detailed Explanation
5.1 omx ask Command
| Command Format |
Purpose |
omx ask claude "question" |
Basic Q&A |
omx ask claude --agent-prompt=role "task" |
Invoke with role |
omx ask claude -p "prompt" |
Specify prompt |
omx ask claude --print "content" |
Output to file |
5.2 Claude Agent Roles
| Agent |
🎯 Purpose |
📝 Typical Scenario |
architect |
Architecture analysis, design suggestions |
System design review |
code-reviewer |
Code review, quality check |
External perspective review |
researcher |
External documentation, best practices |
Framework documentation lookup |
critic |
Design review, problem identification |
Critical analysis of solutions |
analyst |
Requirements analysis, problem decomposition |
Complex requirement breakdown |
security-reviewer |
Security review |
Security vulnerability check |
🚀 6. Complete Workflow Examples
6.1 New Feature Development Full Process
🔴【阶段 1】需求分析 - Claude
omx ask claude --agent-prompt=analyst "分析用户认证模块需求"
🔴【阶段 2】架构设计 - Claude
omx ask claude --agent-prompt=architect "设计认证模块架构方案"
🔴【阶段 3】方案评审 - Claude
omx ask claude --agent-prompt=critic "评审架构方案的问题"
🟢【阶段 4】并行实现 - Codex Team
omx team 3:executor "实现 auth API" "实现前端组件" "编写单元测试"
🟢【阶段 5】调试修复 - Codex
omx --agent debugger "修复测试失败"
🔴【阶段 6】代码审查 - Claude
omx ask claude --agent-prompt=code-reviewer "审查认证模块代码"
🔴【阶段 7】安全审查 - Claude
omx ask claude --agent-prompt=security-reviewer "安全审查认证流程"
🟢【阶段 8】最终验证 - Codex
omx --agent verifier "验证功能完整性"
6.2 Bug Fix Flow
| Step |
Engine |
Command |
| 1. Problem localization |
🟢 Codex |
omx --agent debugger "Investigate login failure" |
| 2. Root cause analysis |
🟢 Codex |
omx --xhigh --agent debugger |
| 3. Fix implementation |
🟢 Codex |
omx --agent executor "Fix issue" |
| 4. Test verification |
🟢 Codex |
omx --agent test-engineer "Write regression tests" |
| 5. Review confirmation |
🟠 Claude |
omx ask claude --agent-prompt=code-reviewer |
⚙️ 7. Configure Custom Agent Models
7.1 Edit Agent Configuration
# 查看当前 agent 配置
cat ~/.codex/agents/executor.toml | grep model
# 编辑特定 agent
omx agents edit executor
# 添加新 agent
omx agents add my-custom-agent --scope user
7.2 Agent TOML Configuration Example
# ~/.codex/agents/executor.toml
name = "executor"
description = "Code implementation, refactoring, feature work"
# 模型配置
model = "gpt-5.4" # 可改为 gpt-5.5, gpt-5-spark 等
model_reasoning_effort = "medium" # low | medium | high | xhigh
# 角色 posture
posture = "deep-worker" # 执行优先姿态
model_class = "standard" # standard | frontier
7.3 Model Suggestions for Different Complexity
| Complexity |
Model Suggestion |
Reasoning Depth |
| 🟢 Low |
gpt-5-spark or gpt-5.4 |
low |
| 🟡 Medium |
gpt-5.4 |
medium |
| 🔴 High |
gpt-5.5 |
high / xhigh |
✅ 8. Current Configuration Status
| Configuration Item |
Current Value |
| Codex primary model |
gpt-5.5 (timi.d-1.top) |
| Default reasoning depth |
medium |
| Claude invocation |
Local Claude CLI |
| Agent default model |
gpt-5.4 |
| Team max threads |
6 |
| Subtask depth |
2 |
❓ 9. Frequently Asked Questions
🤔 Q: Why can't Claude modify code?
A: omx ask claude is an external call mode; Claude cannot access Codex file operation tools. You must use Codex when code modification is needed.
🔧 Q: How to make different workers use different models?
A: Edit each Agent's TOML configuration file, setting different model and model_reasoning_effort values.
🔄 Q: When to switch between Team mode and normal session?
A: Use normal session for single-file tasks; use Team for multi-module parallel tasks; use Claude for external perspective analysis.
🌟 Q: What are Claude's advantages?
A: Claude has a broader external knowledge base, suitable for architecture reviews, best practice references, documentation lookups, and other scenarios requiring external perspectives.
🎯 Quick Decision Tree
需要修改代码?
├── 是 → Codex
│ ├── 单文件 → omx --agent executor
│ ├── 多文件 → omx team N:executor
│ └── 调试 → omx --agent debugger
│
└── 否 → Claude
├── 架构设计 → omx ask claude --agent-prompt=architect
├── 代码审查 → omx ask claude --agent-prompt=code-reviewer
├── 外部文档 → omx ask claude --agent-prompt=researcher
└── 设计评审 → omx ask claude --agent-prompt=critic
💡 Tip: Choose the appropriate engine based on task characteristics to fully leverage the dual-engine advantages!
暂无评论。