GPT WORLD / INDEPENDENT CODEX FIELD MANUAL 出典レビュー · 2026-07-26

フィールドガイド / 19 分

Subagents から安全な Automation へ拡張する

Independent evidence を parallelize し、stable workflow を codex exec/CI へ。

トラック
Codex CLI コア
レベル
Automation
成熟度
Stable core; custom-agent authoring may evolve

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 を使います。

CLI

検証済みターミナル手順

TERMINAL / 意図を持ってコピー
  1. /agent
  2. $codex exec "summarize the repository structure"
  3. $codex exec --ephemeral "triage this repository"
  4. $codex exec --json "summarize the repo structure" | jq
  5. $codex exec resume --last "continue the task"
A

作業原則

01

Independence を parallelize

Exploration/tests/triage/review から。writes は ownership 必須。

02

Child inherits boundary

Parent sandbox/live overrides を継承。

03

Stable contract only

Prompt/input/permission/output/failure が repeatable 後 automate。

B

フィールド手順

  1. 01

    Bounded reads delegate

    Concern ごと agent、wait、concise evidence。

  2. 02

    Threads inspect

    /agent で status/result。

  3. 03

    codex exec prototype

    Read-only/ephemeral から。

  4. 04

    Machine output

    --json/schema、compatible state だけ resume。

  5. 05

    Harden CI

    openai/codex-action@v1、trusted trigger、minimal permission、separate write job。

PASS / FAIL

受入チェック

  • Subtasks independent。
  • Parent least privilege。
  • Non-zero/malformed handled。
  • Write credential isolated。

WATCH / REJECT

失敗パターン

  • Tightly coupled writes parallel。
  • Deprecated --full-auto。
  • Job-wide API key exposure。