Long prompts cause output-format drift in non-interactive CI runs
Resolved 💬 2 comments Opened Feb 8, 2026 by xudesheng Closed Apr 6, 2026
Problem
In non-interactive CI runs, prompts typically include two parts: (1) implementation requirements and (2) a strict output document format. As the prompt grows, Codex often produces correct code but the output document drifts from the required format (missing sections, wrong ordering, or content mismatches).
Impact
- Repeated CI failures despite correct code changes
- Review churn and manual re-runs
- Reduces reliability of Codex for workflows that require strict doc outputs (review requests, summaries, changelogs, etc.)
Minimal Repro (Headless)
- Run
codex execin a repo with a long prompt (>200 lines) containing a strict output template. - Ask for a small code change plus a required document output in that template.
- Observe that the output format often deviates from the template as prompt length increases.
Expected
Output format compliance should remain stable regardless of prompt length.
Observed
Format compliance degrades with longer prompts (missing sections, formatting drift, or content that doesn’t match the template), even when the code implementation is correct.
I can provide anonymized examples/logs if that helps.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗