Goal mode · Hooks GA · Automations · カスタムプロバイダー
Codex
Goal mode GA: 数日〜1週間単位の継続タスク実行が正式GA。ゴールを定義するとCodexが自律的に計画→実行→修正を繰り返す。最大72h継続実行、チェックポイントでgit commitが自動作成される。
AppShots ⌘⌘: ⌘⌘ショートカットで他アプリのスクリーンショットをCodexへ即座に転送。デザインツール・ブラウザのUIをそのままコーディングに活かせる。
codex doctor: 新しい環境診断コマンド。APIキーの有効性・設定ファイルの問題・依存関係の確認を自動実行してレポートを生成。
Codex
Hooks GA: 5種類のHooksシステムが正式GA。PreToolUse / PermissionRequest / PostToolUse / UserPromptSubmit / Stop。managed_dirでエンタープライズ強制Hooksを配布できる。Codexアクセストークンとの組み合わせでCI/自動化パイプラインが構築可能。
ChatGPT mobile接続: iOSアプリからリモートでCodexに接続可能に。Remote Controlを有効化→QRコードスキャンでセットアップ。長時間Goal modeタスクをモバイルから監視・方向転換できる。
Codex
GPT-5.3-Codex-Spark (Preview): 軽量高速モデル。コスト比でGPT-5の約1/5。ルーティング・ステップ間判断・シンプルな補完に最適。Goal mode内の計画ステップに使うとコスト削減効果が大きい。
--full-auto 廃止予告: --full-autoフラグは廃止予定。config.tomlの[approval_policy]設定に移行する。default = "on-failure"(失敗時のみ確認)など細かい制御が可能になる。
# ~/.codex/config.toml [features] codex_hooks = true goal_mode = true [approval_policy] default = "on-failure" [hooks] managed_dir = "/enterprise/hooks" [[hooks.PreToolUse]] matcher = "^Bash$" [[hooks.PreToolUse.hooks]] type = "command" command = "python3 /hooks/policy.py" timeout = 30 [automations] schedule = "0 9 * * 1" webhook_url = "https://hooks.slack.com/services/..." [goal] timeout = "72h" enabled = true [provider] type = "azure" endpoint = "https://my-azure.openai.azure.com" model = "gpt-4o"
| スコープ | ファイル | 対象範囲 |
|---|---|---|
| User | ~/.codex/config.toml | 自分・全プロジェクト |
| Project | .codex/config.toml | リポジトリ全員(Git管理) |
| Enterprise | requirements.toml | 組織強制(managed_dir指定) |
# AGENTS.md
## Project
TypeScript monorepo (pnpm workspaces)
Node 22 / React 19 / PostgreSQL 16
## Build & Test
build: pnpm build | test: pnpm test | lint: pnpm lint
## Rules
- Never commit to main directly
- TDD: write tests before implementation
- All API endpoints require Zod validation
## Done when
- pnpm test passes
- pnpm lint clean
- pnpm tsc --noEmit succeeds
セッション開始時に自動ロード。CLAUDE.mdと互換した設計のため既存CLAUDE.mdをそのまま使える。
| イベント | タイミング |
|---|---|
PreToolUse | ツール実行前(denyで強制ブロック・--yolo下でも有効) |
PermissionRequest | 承認要求時 |
PostToolUse | ツール実行後(自動フォーマット等) |
UserPromptSubmit | ユーザーのプロンプト送信時 |
Stop | ターン終了時(バリデーション強制) |
複数ファイルからマッチしたHooksは全て実行。同一イベントの複数コマンドHookは並列起動。
[[hooks.PreToolUse]] matcher = "^Bash$" [[hooks.PreToolUse.hooks]] type = "command" command = "python3 /hooks/pre_tool_use_policy.py" statusMessage = "Checking Bash command policy" # エンタープライズ強制: requirements.toml [hooks] managed_dir = "/enterprise/hooks" # 全ユーザーに強制適用
# .codex/agents/security-reviewer.toml model = "gpt-5.4" sandbox_mode = ":read-only" model_reasoning_effort = "high" nickname_candidates = ["Sherlock", "Inspector"]
~/.codex/agents/ / プロジェクト共有: .codex/agents/agents.max_depthはデフォルト1(再帰的委任が必要な場合のみ変更)6観点×1エージェントで並列PRレビュー: セキュリティ・コード品質・バグ・競合状態・テスト安定性・保守性
ChatGPT mobile接続: Remote Controlを有効化→QRコードスキャン。長時間タスクをモバイルから監視・承認できる。
--- commit/SKILL.md --- name: commit description: Stage and commit changes in semantic groups. Use when the user wants to commit or organize commits. --- 1. Do not run `git add .`. Stage in logical groups. 2. Group: feat → test → docs → refactor → chore. 3. Write concise commit messages.
~/.codex/skills/ / チーム: .agents/skills/$skill-creator / $skill-installer[goal] timeout = "72h" enabled = true checkpoint = "8h"
Claude CodeのManaged Agents(Dreaming / Outcomes / Multiagent Orchestration)に相当する統合エージェントOS機能はCodexに存在しない。
| 機能 | Codexでの代替 |
|---|---|
| Dreaming(セッション間記憶) | AGENTS.mdに手動でルール・学習を蓄積する |
| Outcomes(評価ループ) | Stop Hookでテスト実行→失敗時に再実行する |
| Multiagent Orchestration | Subagents + Goal mode内での並列タスク分解 |
Codexの強みはGoal modeによる長期タスク委任。細かいエージェント制御よりも「ゴールを定義して長期委任する」スタイルが向いている。
[automations] schedule = "0 9 * * 1" # 毎週月曜 9:00 webhook_url = "https://hooks.slack.com/services/..." task = "週次PRレビューサマリーを生成してSlackへ通知" worktree = true
$skill-name形式)