跳轉到

Codex CLI

Codex CLIait 包起來,每次 session 都在獨立 Git worktree 跑、含完整 provenance。

為什麼用 ait 包 Codex

  • Codex 變更被限制在 attempt worktree — promote 前 root checkout 不動。
  • 失敗的 session 留下供檢視,不會悄悄消失。
  • 連續 Codex 執行會餵 ait repo-local memory,下一次 session 會記得 之前試過什麼。

設定

ait init                  # 偵測 PATH 上的 `codex`,自動裝 hook + wrapper
ait adapter doctor codex  # 可選的 sanity check

ait init 會在 codex$PATH 上時自動寫 .codex/hooks.json.ait/adapters/codex/ 的 bridge。要顯式重跑用 ait adapter setup codex

在 ait 下跑 Codex

設定完後直接呼叫即可:

codex

或用 intent 顯式包:

ait run --adapter codex --intent "實作 parser edge cases" -- codex

修復與重整

如果 wrapper 漂掉了(例如 Codex 升版後):

ait repair codex

審核 attempts

ait attempt list
ait attempt show <attempt-id>
ait memory recall "parser edge cases"

相關