實作指南 / 24 分鐘
依模型、effort 與 scope 規劃 Codex 工作
先保留 session continuity,再選 GPT-6.1 Sol、Astra 或 Luna,而且不改變 permission boundary。
Model-aware planning 不只是選最大模型。先保留已掌握 repository 與對話內容的 CLI,依任務角色選模型,只使用該模型公告支援的 native effort,並把 subagent orchestration 與單一任務深度分開。Codex 設定仍依 scope 解析,而模型存取權會隨 release、account、登入方式、方案與 rollout 漂移;已退役的 model ID 也必須在 script 依賴它之前換掉。
已驗證 Terminal Sequence
- ›
/model - ›
/status - $
codex -p deep-review - $
codex -m gpt-6.1-sol -s workspace-write "<GOAL>" - $
codex exec -m gpt-6-astra -c 'model_reasoning_effort="low"' -s read-only --ephemeral "<GOAL>" - $
codex exec -m gpt-6-luna -c 'model_reasoning_effort="high"' -s read-only --ephemeral "<GOAL>"
工作原則
Continuity first
一般 repository 工作保留目前 Codex session。只有另一套 CLI 的原生 workflow 或獨立 review 有具體收益,而且大於重建 context 的成本時才切換。
先分角色,不做排名
在 2026-10-21 檢視的 Codex CLI 0.163.0 catalog 中,GPT-6.1 Sol 是複雜 coding 與 agentic 工作的建議主力、GPT-6 Astra 是最困難端到端工作的最強選擇、GPT-6 Luna 負責明確、可重複的大量任務。GPT-6 Sol 是上一代主力,GPT-5.6 Sol、Terra 與 Luna 則在 rollout 期間作為舊款選項保留。這是 routing role,不是永久 benchmark 排名。
推理不等於權限
切換 model、native effort、max 或 ultra,都不會升級 sandbox、approval policy、writable roots、network 或外部 action 權限;選擇某個模型也不代表取得它的使用權。應保留或縮小現有 permission boundary。
Catalog 是 account-scoped snapshot
啟動前使用 /model 與 /status。Availability、default、context 上限、quota 與 supported effort 會因 release、方案、登入方式、workspace 設定與 rollout 而不同;有日期的 catalog 是 evidence,不是 entitlement。
實地程序
- 01
選模型前先查 live state
在 active account 執行 /model 與 /status。2026-10-21 檢視的 Codex CLI 0.163.0 列出 gpt-6.1-sol(bundled default)、gpt-6-astra、gpt-6-sol、gpt-6-luna,以及較舊的 gpt-5.6-sol、gpt-5.6-terra、gpt-5.6-luna;但 picker 只會顯示你的 account 與 workspace 可用的模型。獲准加入 Daybreak cyber access program 的帳號可能另外看到 gpt-daybreak-blue-latest,請把它視為 access-program 模型,而非一般預設。你的 live catalog 才是最終依據。
- 02
把任務配到模型角色
Ambiguous architecture、困難 debugging、security reasoning 與日常 edit-test-review 先用 GPT-6.1 Sol;官方定位是以較低成本提供接近 Astra 的表現。任務需要跨多步驟與 tools 的最強能力時選 GPT-6 Astra。明確 extraction、classification、transformation、inventory 等已知何謂好結果的重複工作用 GPT-6 Luna。預期收益小於 context-switch cost 時保留目前模型。
- 03
只選支援的 native effort
擷取到的 GPT-6.1 Sol、GPT-6 Astra、GPT-6 Sol 支援 low、medium、high、xhigh、max、ultra;GPT-6 Luna 支援 low 到 max,不支援 ultra。官方起點:GPT-6.1 Sol 用 client 預設、Luna 用 high、Astra 用 low(其他 client 顯示為 Light)。max = single-task depth;ultra = provider-native subagent orchestration,適合能拆成有意義平行部分的工作,不是更強的 max 同義詞。多數任務兩者都不需要。在 TUI 開啟 /model、選擇模型,再選 More reasoning… 查看該模型支援的 Max 或 Ultra。
- 04
用明確安全邊界啟動
一般修改用 gpt-6.1-sol 的預設 effort 搭配 workspace-write。唯讀分析最困難的問題時,gpt-6-astra 從 model_reasoning_effort="low" 開始,只有任務需要更多規劃或檢查時才調高;唯讀機械工作用 gpt-6-luna 搭配 "high"。TOML value 要加引號。Codex 的 -p/--profile 是 profile selector,絕不是 print、prompt 或 non-interactive;headless 請用 codex exec。
- 05
向 Knowledge MCP 查 dated catalog
在 MCP client 呼叫 worlds_list_cli_models,input 為 {"products":["codex"]}。閱讀 availability、supported_efforts、constraints、capture date 與 source,再和 /model 比對後才執行 selector。
- 06
產生 advisory work plan
只有已授權修改時,才呼叫 worlds_plan_cli_work 並傳入 {"task":"<GOAL>","current_cli":"codex","available_clis":["codex"],"workstreams":[{"id":"implementation","goal":"<GOAL>","execution_intent":"may-edit"}],"strategy":"continuity-first","risk_tolerance":"low","execution_environment":"local-workspace","orchestration_mode":"none","require_independent_review":false}。唯讀工作省略該 intent,系統預設 read-only。Assignments 與 commands 都是待審建議;工具不會啟動 CLI,也不會授予 permissions。
- 07
替換已退役的 model ID
GPT-5.3-Codex-Spark(gpt-5.3-codex-spark)已於 2026-09-14 退役。使用 ChatGPT 登入時,gpt-5.4 與 gpt-5.4-mini 已於 2026-08-31 自 Codex 退役(可用時分別改用 gpt-6-sol 與 gpt-6-luna),gpt-5.5 則於 2026-10-14 退役(方案包含時改用 gpt-6.1-sol)。API-key session 依 API 的模型可用性運作,不受 gpt-5.4 與 gpt-5.5 的 Codex 退役影響。搜尋 scripts、profile files、custom agents 與 managed configuration 中的舊 ID,換成 /model 列出的模型,再重跑驗證。
- 08
不虛構存取權的 fallback
指定模型或 effort 不可用時,重新開啟 /model,選 live 支援項目或移除 explicit model override,並保留原有 sandbox/approval。記錄 fallback 並重跑 task-specific verification。
- 09
只持久化耐久設定
Personal defaults 放 user config、shared trusted-repo behavior 放 project config、specialized behavior 放獨立 profile file;一次模型實驗留在 command line。
PASS / FAIL
驗收清單
- 除非記錄了具體收益,否則保留 active session。
- 選定模型存在於此 account 的 /model。
- Native effort 由 exact model 支援。
- max 與 ultra 沒有混為一談。
- Model 選擇沒有擴張 permissions。
- 沒有 script、profile 或 custom agent 仍選用退役 model ID。
- MCP output 已與 live catalog 核對。
- Command 使用 quoted TOML 與預期 sandbox。
- Fallback 與 verification 明確。
WATCH / REJECT
失敗模式
- 把 GPT-6.1 Sol、Astra、Luna 當成永久 account entitlement。
- 在 Luna 使用 ultra,或在不可獨立拆分的任務使用 orchestration。
- 假設更高 effort 會授予 tools/network/write。
- 在以 ChatGPT 登入執行的 script 中保留 gpt-5.5 或 gpt-5.4。
- 把 codex -p 當成 print 或 prompt flag。
- 未檢查 local CLI/effective policy 就複製 MCP command。
- 使用已移除 legacy profiles table。