實作指南 / 10 分鐘
診斷 Codex、檢視 features 並產生 completions
修改設定或 shell startup 前,先讀取可觀察 inventory。
Codex 的 doctor 檢查 installation/runtime layers,features 顯示 feature stage/effective state,completion 產生 shell integration,debug utilities 則提供特定 evidence,例如 bundled model catalog。應先 read-only inspection,保留 version context,並在放進 ticket 或 startup file 前 review output。
已驗證 Terminal Sequence
- $
codex doctor --summary - $
codex features list - $
codex completion zsh > /tmp/_codex - $
codex debug models --bundled
工作原則
先記錄 release
Feature stages、output fields、supported shells 會變;每份 diagnostic 都要配 codex --version。
先 inspect 再 mutate
Enable/disable 前列 effective feature state,source 前檢查 completion output。
小心分享 diagnostics
Report 可能含 paths、repo names 與 config clues;外傳前 review/redact。
實地程序
- 01
確認 identity
解析 active executable/version,避免報告和另一個 installation 混淆。
- 02
執行分層診斷
先 doctor summary,再處理第一個 failing installation/auth/config/Git/runtime/terminal/thread layer。
- 03
檢視 feature state
features list,變更前記錄 stage/effective value。
- 04
產生 shell completion
選 bash/elvish/fish/powershell/zsh,先寫 temporary file、檢查,再依 shell 整合。
- 05
窄用 debug
只跑需要 evidence 的 debug subcommand,不預設公開 broad dump。
PASS / FAIL
驗收清單
- Version/executable 有記錄。
- 先處理第一個 failing layer。
- Feature change 指向一個 exact feature。
- Completion 符合 active shell。
- Shared reports 已檢查敏感 paths。
WATCH / REJECT
失敗模式
- 未讀 doctor 就改多層 config。
- 猜測並啟用 experimental feature。
- 未檢查就 append generated shell code。