Skip to content

Ask Codex to Locate the Source of a Generated File

2026-09-03codex, code-review

A generated file can look like the obvious place to fix a typo. The next build may overwrite that edit and bring the problem back.

Ask Codex to trace the file to its generator or source collection before changing it. Require the report to name the build command and show which source field controls the output. Then edit a disposable example at that source and regenerate it.

Compare the result with the intended change and check that unrelated output stays stable. Keep the generator's own tests in the verification path. The useful review question is whether the repair survives regeneration, not whether the checked-in output happens to look correct immediately after an edit.

OpenAI documentation.