Skip to content

Check a Codex Worktree Before Trusting Its Result

2026-08-21codex, worktrees

A correct change in the wrong checkout is still the wrong delivery. Before a Codex task starts, establish its directory, branch and base revision.

After the task, inspect the diff and run the relevant checks in that same worktree. If you transfer the change to another checkout, verify there too: dependencies, ignored configuration and local data may differ even when the tracked files match.

Worktrees separate working files while sharing Git repository metadata. They do not create independent cloud accounts, databases or external services. Two isolated branches can still write to the same remote system. Keep the task's external target explicit, and use a disposable local fixture when the work is meant to be an experiment rather than a production operation.

OpenAI documentation.