FIELD MANUAL / 18 GUIDES
18本のガイド、ひとつの terminal-first system。
Primary track は実際の repository で Codex を運用する方法を教えます。Secondary track は API / SDK を直接使う builder 向けの architecture atlas です。
Codex CLI コア
Codex CLI コアコース
インストールと権限から reusable workflows、subagents、CI まで順番に進めます。
- 01 ガイドを読む↗
Foundation / 10 分 / Stable
Codex を導入し、toolchain を証明する
信頼できる Codex workflow は最初の prompt より前に始まります。公式 standalone installer を使い、実際に動く binary と version を確認し、意図的に更新し、config・auth・Git・terminal の問題を codex doctor の evidence で解決します。
- 02 ガイドを読む↗
Foundation / 11 分 / Stable
Credential を漏らさず認証を選ぶ
Codex は subscription access の ChatGPT sign-in と usage-based の API-key sign-in をサポートします。Flow を意図的に選び、secret は stdin で渡し、active method を検証し、local auth storage を password として扱います。
- 03 ガイドを読む↗
Foundation / 12 分 / Stable
最初の terminal session を engineering task にする
有用な最初の session は正しい repository、境界付き permission、goal・context・constraints・done condition を含む prompt から始まります。Codex は探索、編集、checks を行えますが、task boundary は明示する必要があります。
- 04 ガイドを読む↗
Safety / 14 分 / Stable
自律性より先に authority を設定する
Codex security は OS-enforced sandbox と approval policy の組み合わせです。workspace-write + on-request は実用的な local default、read-only は分析向け。web search は spawned command の network access を自動では許可しません。
- 05 ガイドを読む↗
Workflow / 13 分 / Stable
長い CLI session を制御する
Codex CLI は live work の keyboard-first controls と、persisted session の top-level lifecycle commands を提供します。Plan/status/diff/compact/review で現在の作業を制御し、resume、fork、archive、unarchive、永久 delete で保存済み work を明示的に管理します。
- 06 ガイドを読む↗
Repository setup / 15 分 / Stable
AGENTS.md で repository knowledge を永続化する
Codex は作業前に global guidance、repo root から cwd までの project files を結合します。近い guidance が後で override し、各 level では AGENTS.override.md が優先。combined project guidance には default size limit があります。
- 07 ガイドを読む↗
Repository setup / 16 分 / Stable
偶然ではなく scope で Codex を設定する
Codex は CLI override、trusted project layers、selected profile、user config、system config、built-in defaults の順で解決します。Profile は別 file。Model availability は live に確認し、evergreen advice に固定しません。
- 08 ガイドを読む↗
Workflow / 14 分 / Stable
変更を reviewable evidence にする
Codex は実装、checks、working-tree diff、dedicated reviewer を扱えます。Review scope は uncommitted、base branch、commit、custom instruction のいずれか一つ。Reviewer は findings を返し tree を変更しません。
- 09 ガイドを読む↗
Extension / 16 分 / Stable
MCP で外部 system を接続する
Codex は STDIO と Streamable HTTP MCP をサポートし、CLI・IDE・desktop app が host config を共有します。Connection には transport、auth source、timeouts、required status、enabled tools、approval behavior が必要です。
- 10 ガイドを読む↗
Extension / 15 分 / Stable
繰り返す workflow を Skills にする
Skills は instructions、references、scripts、assets を package し、Codex は選択時だけ full instructions を読みます。Plugins は configured marketplace 経由で skills と optional MCP を配布します。Install 前に marketplace を list/review し、明示的な plugin を選びます。
- 11 ガイドを読む↗
Guardrails / 17 分 / Mixed: hooks stable; rules experimental
Hooks と Rules で guardrails を置く
Hooks は PreToolUse、PostToolUse、Stop、SessionStart 等で trusted command handlers を実行します。Rules は sandbox 外の command prefix を allow/prompt/forbidden にします。Hooks は stable、rules は experimental、最も restrictive な match が優先です。
- 12 ガイドを読む↗
Automation / 19 分 / Stable core; custom-agent authoring may evolve
Subagents から安全な Automation へ拡張する
Subagents は noisy exploration を main thread から分離し、independent read-heavy work を並行化します。codex exec は default read-only、progress は stderr、final は stdout。JSONL/schema が machine consumer を支え、GitHub Actions は公式 action と least privilege を使います。
OpenAI Platform / API
OpenAI Platform / API ノート
OpenAI APIs と SDKs を直接使う developer 向けの companion architecture guidance です。
- 13 ガイドを読む↗
Platform architecture / 9 分 / Stable
Responses をシステム境界にする
Responses API は新しい OpenAI integration の推奨出発点です。単なる text generation wrapper ではなく、message、tool call、tool result、将来の input type を明示的な event として扱います。
- 14 ガイドを読む↗
Platform architecture / 11 分 / Stable
各 Tool に狭い契約を与える
OpenAI tools は検索、file retrieval、code execution、MCP 接続、custom function を提供できます。信頼性は各 action の周囲——小さな schema、明示 authority、idempotency、解釈可能な result——から生まれます。
- 15 ガイドを読む↗
Platform architecture / 8 分 / Stable
Schema をユーザー体験として設計する
Structured Outputs は response を JSON Schema に従わせ、parsing failure の一部をなくします。しかし値の真実性、有用性、権限、安全な適用までは証明しません。
- 16 ガイドを読む↗
Platform architecture / 12 分 / Stable
Agent Loop の所有者を決める
Agent は plan、tool call、state、specialist handoff を扱います。重要なのは agent 数ではなく、run loop、tool policy、state、approval、trace を誰が所有するかです。
- 17 ガイドを読む↗
Platform architecture / 10 分 / Stable
Realtime をライブシステムとして設計する
Realtime session は低遅延 live interaction 向けです。本番 voice は audio streaming だけでなく、client に合う transport、session state、interruption、tool latency budget、partial turn recovery が必要です。
- 18 ガイドを読む↗
Platform architecture / 9 分 / Stable
モデル選択を境界へ隔離する
OpenAI model catalog は変化します。製品 code は quality、latency、modalities、tool support、budget の capability profile を要求し、configuration と evaluation で実体へ解決します。