Codex自动化约 2 分钟

用 codex exec 做可复现跑

Script Workflows with Codex Exec

要点

  1. 用 codex exec 把提示变成可脚本化流程,适合评测、批处理、CI 和定时任务。
  2. 每次跑用临时会话、钉死模型和 reasoning,关掉网络和 MCP,避免本地状态污染。
  3. 每次运行放到单独目录,方便对比提示或模型而不被旧文件干扰。
  4. 适合做隔离实验:同一提示换模型或换 reasoning,结果可横向对比。

原帖开头

Codex tip: use codex exec to turn any prompt into a repeatable, scriptable workflow. I typically use it for clean, isolated model runs: ephemeral sessions, a pinned model and reasoning effort, no network or MCP access, and a separate directory for every run. It's super usef