Pilot a Codex Migration on Two Files, Then Diff the Requests
You need to move 40 experiment configs to a new format: a renamed field, a new default, a changed prompt-template path. It is mechanical, so it is tempting to hand Codex the whole directory. Prove it on two files first, and choose them so that one is ordinary and one is the strangest config you have.
Codex worktrees fit this pilot. OpenAI's documentation says worktrees "let Codex run multiple independent chats in the same project without interfering with each other," and Codex creates them under $CODEX_HOME/worktrees by default. When the pilot looks right, Hand off moves the chat and its code between the worktree and your local checkout, or Create branch here turns the worktree into a branch.
A worktree keeps the pilot's edits out of your main checkout. It does not tell you the migration is correct. For a config migration that is supposed to leave the experiment unchanged, you can check that directly, without calling a model.
The check. Before the migration, have your harness write the exact request payloads it would send for the two pilot configs: model id, messages, sampling parameters and tool definitions. If the harness has no dry-run mode, adding one is the first task to give Codex. Dump the payloads again after the migration and compare:
diff <(jq -S . before/requests.json) <(jq -S . after/requests.json)jq -S sorts keys, so reordered fields do not show up as noise. Expected: no differences, or only the ones you intended, each with a reason. A silent change in temperature or maximum output tokens appears here in seconds. Without the diff it appears weeks later as an unexplained shift in your results.
Write down any rule that needed clarifying in the pilot. Then run the same procedure on the remaining 38 configs, and compare the list of touched files with the scope you intended.