codex-system

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex System — Deep Reasoning Partner

Codex 系统 — 深度推理伙伴

Codex CLI (gpt-5.3-codex) is your highly capable supporter for deep reasoning tasks.
詳細ルール:
.claude/rules/codex-delegation.md
Codex CLI (gpt-5.3-codex) 是您完成深度推理任务的得力助手。
详细规则
.claude/rules/codex-delegation.md

Context Management (Opus 4.6)

上下文管理(Opus 4.6)

Claude の 1M コンテキストにより、直接呼び出しの許容範囲が拡大した。ただし大きな出力はサブエージェント経由を推奨。
状況方法
短い質問(〜50行回答)直接呼び出しOK
詳細な設計相談サブエージェント経由(推奨)
デバッグ分析サブエージェント経由(推奨)
Agent Teams 内での相談Teammate が直接呼び出し
借助Claude的1M上下文窗口,直接调用的适用范围得到了扩展。不过,对于大篇幅输出,建议通过子Agent调用。
场景方式
短问题(约50行以内的回答)可直接调用
详细设计咨询建议通过子Agent调用
调试分析建议通过子Agent调用
Agent Teams 内的咨询由团队成员直接调用

When to Consult (MUST)

必须咨询的场景

SituationTrigger Examples
Design decisions「どう設計?」「アーキテクチャ」 / "How to design?"
Debugging「なぜ動かない?」「エラー」 / "Debug" "Error"
Trade-off analysis「どちらがいい?」「比較して」 / "Compare" "Which?"
Complex implementation「実装方法」「どう作る?」 / "How to implement?"
Refactoring「リファクタ」「シンプルに」 / "Refactor" "Simplify"
Code review「レビューして」「確認して」 / "Review" "Check"
场景触发示例
设计决策「如何设计?」「架构」 / "How to design?"
调试「为什么无法运行?」「错误」 / "Debug" "Error"
权衡分析「哪个更好?」「对比一下」 / "Compare" "Which?"
复杂实现「实现方法」「如何构建?」 / "How to implement?"
重构「重构」「简化」 / "Refactor" "Simplify"
代码评审「帮忙评审」「检查一下」 / "Review" "Check"

When NOT to Consult

无需咨询的场景

  • Simple file edits, typo fixes
  • Following explicit user instructions
  • git commit, running tests, linting
  • Tasks with obvious single solutions
  • Codebase analysis → Claude does this directly (1M context)
  • 简单文件编辑、拼写错误修复
  • 遵循明确的用户指令
  • git提交、运行测试、代码检查
  • 有明显单一解决方案的任务
  • 代码库分析 → 由Claude直接完成(依托1M上下文)

How to Consult

咨询方式

In Agent Teams (Preferred for /startproject)

在Agent Teams中(推荐用于/startproject)

Architect Teammate が Codex を直接呼び出し、Researcher Teammate と双方向通信する。
/startproject 内の Phase 2 で、Architect Teammate として Codex を活用:
- 設計検討 → Codex に相談
- Researcher からの調査結果を受けて設計を修正
- 設計決定を .claude/docs/DESIGN.md に記録
由Architect团队成员直接调用Codex,并与Researcher团队成员进行双向沟通。
在/startproject的第二阶段,以Architect团队成员身份活用Codex:
- 设计研讨 → 咨询Codex
- 根据Researcher的调研结果修正设计
- 将设计决策记录到.claude/docs/DESIGN.md中

Subagent Pattern (Standalone consultation)

子Agent模式(独立咨询)

Use Task tool with
subagent_type='general-purpose'
for larger outputs.
Task tool parameters:
- subagent_type: "general-purpose"
- run_in_background: true (optional, for parallel work)
- prompt: |
    Consult Codex about: {topic}

    codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "
    {question for Codex}
    " 2>/dev/null

    Return CONCISE summary (key recommendation + rationale).
对于大篇幅输出,使用Task工具并设置
subagent_type='general-purpose'
Task工具参数:
- subagent_type: "general-purpose"
- run_in_background: true (可选,用于并行工作)
- prompt: |
    就以下主题咨询Codex: {topic}

    codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "
    {向Codex提出的问题}
    " 2>/dev/null

    返回简洁的总结(核心建议+理由)。

Direct Call (Up to ~50 lines response)

直接调用(最多约50行回复)

bash
codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "Brief question" 2>/dev/null
bash
codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "简短问题" 2>/dev/null

Sandbox Modes

沙箱模式

ModeUse Case
read-only
Analysis, review, debugging advice
workspace-write
Implementation, refactoring, fixes
模式使用场景
read-only
分析、评审、调试建议
workspace-write
实现、重构、修复

Language Protocol

语言协议

  1. Ask Codex in English
  2. Receive response in English
  3. Execute based on advice (or let Codex execute)
  4. Report to user in Japanese
  1. 英文向Codex提问
  2. 英文接收回复
  3. 根据建议执行(或让Codex执行)
  4. 日文向用户汇报

Task Templates

任务模板

Design Review

设计评审

bash
codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "
Review this design approach for: {feature}

Context:
{relevant code or architecture}

Evaluate:
1. Is this approach sound?
2. Alternative approaches?
3. Potential issues?
4. Recommendations?
" 2>/dev/null
bash
codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "
评审以下{功能}的设计方案:

上下文:
{相关代码或架构}

评估要点:
1. 该方案是否合理?
2. 有哪些替代方案?
3. 存在哪些潜在问题?
4. 有什么建议?
" 2>/dev/null

Debug Analysis

调试分析

bash
codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "
Debug this issue:

Error: {error message}
Code: {relevant code}
Context: {what was happening}

Analyze root cause and suggest fixes.
" 2>/dev/null
bash
codex exec --model gpt-5.3-codex --sandbox read-only --full-auto "
调试以下问题:

错误信息: {error message}
代码: {相关代码}
上下文: {当时的操作场景}

分析根本原因并提出修复建议。
" 2>/dev/null

Code Review

代码评审

See:
references/code-review-task.md
参考:
references/code-review-task.md

Refactoring

重构

See:
references/refactoring-task.md
参考:
references/refactoring-task.md

Integration with Gemini

与Gemini的集成

TaskUse
Need external research firstGemini → then Codex
Design decisionCodex directly
Library comparisonGemini research → Codex decision
/startprojectAgent Teams: Researcher (Gemini) ↔ Architect (Codex)
任务使用方式
需先进行外部调研先使用Gemini → 再咨询Codex
设计决策直接咨询Codex
库对比先由Gemini调研 → 再由Codex决策
/startprojectAgent Teams: Researcher(Gemini)↔ Architect(Codex)

Why Codex?

选择Codex的理由

  • Deep reasoning: Complex analysis and problem-solving
  • Code expertise: Implementation strategies and patterns
  • Consistency: Same project context via
    context-loader
    skill
  • Parallel work: Background execution or Agent Teams teammate
  • 深度推理: 复杂分析与问题解决
  • 代码专业度: 实现策略与模式
  • 一致性: 通过
    context-loader
    技能保持项目上下文一致
  • 并行工作: 后台执行或与Agent Teams成员协作