We raised $3M for agent-native runners

Fix flaky tests from CI history

Find tests that fail and then pass on the same commit, and fix clear causes in the test itself.

How OpenAI used this technique

Read what OpenAI changed and follow the original sources.

Fix flaky tests from CI history

The post suggests that prompt for finding flaky tests. In an earlier Codex change (openai/codex#16825, merged April 2026), an approval-policy test launched a second shell command and could fail on Windows startup timing. The fix keeps the escalation-rejection check, asserts that no turn permissions were granted, and checks the approval decision directly.

Use it when
A required check fails, then passes on an identical rerun.
Before applying it
Preserve the behavior and assertions being tested. Retries, larger timeouts and skipped tests can hide the underlying failure.

Company Playbooks