Long prompts cause output-format drift in non-interactive CI runs
Resolved 💬 2 comments Opened Feb 8, 2026 by xudesheng Closed Apr 6, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
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.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This appears to be model behavior, not something that's under the control of the codex harness. We'll share the feedback with the team responsible for training our codex models.