Model outputs the same response twice
Open 💬 12 comments Opened Mar 16, 2026 by thetinygoat
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.114.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.4-high
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty 1.2.3
What issue are you seeing?
Screenshot of the issue, note the model responds with exact same response twice.
<img width="1440" height="348" alt="Image" src="https://github.com/user-attachments/assets/c0ac0bdb-88e0-4be1-935a-64830e6e8663" />
What steps can reproduce the bug?
Nothing special is required, this comes up in normal conversations. Im using the superpowers brainstorming skill not sure if that is relevant.
link to the skill repo: https://github.com/obra/superpowers
What is the expected behavior?
_No response_
Additional information
_No response_
12 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
If you're able to repro this, please use
/feedbackto upload the session details, then post the thread ID here.I have the same issue. Most of the time a duplicate response appears when Codex asks for confirmation for the next step. Something like, "Ok that is the proposed design...do this and do that. Does that sound good?...Ok that is the proposed design...do this and do that. Does that sound good?"
I'll try to repro this and share the thread id
thread ID 019d0b82-cf62-74a1-b1ba-07df92b345a6
Did you increase the context window beyond the usual limit? I tested the 1M when it launched, and once it goes past around 400k tokens, the model becomes unusable. When I scaled it back to just a bit above the usual, around 350k, that problem stopped.
019d2436-feb8-7b71-8b9a-435856700589
No im using the default configuration.
Here's my config.toml
Also ran into this issue, 019d6e2c-748e-72d1-921e-2efb936060b2
Also ran into the same issue - asked the agent to do an RCA and identify actual fix and here's the response:
RCA
The duplication is caused by an instruction collision in my runtime config, not by your prompts.
There are two competing behaviors in the current agent instructions:
That combination leaves too much overlap. The model treats “inform the user while working” and “explain what was done at
the end” as partially redundant tasks, so it restates the same content twice.
There’s also a second contributing factor:
So the model satisfies both objectives independently instead of treating them as separate channels with separate semantics.
Root Cause Summary
The real bug is missing channel separation semantics:
That ambiguity causes repetition.
Actual Fix
Put the preference in the developer prompt, under the channel behavior / final-answer instructions. This is not a repo-
specific AGENTS.md concern and should not live in product constitutions. It is an agent runtime behavior rule.
Best place:
Patch To Apply
Add this to the developer prompt under Intermediary updates:
Channel separation rule:
commentaryis for incremental progress only.commentaryif they will appear infinal.commentaryto summarize the whole task, recap prior progress, or preview the final answer.commentaryupdate should contain only net-new information: current action, newly discovered constraint, orimmediate next step.
Add this to Final answer instructions:
No-repetition rule:
finalmust not recap process updates that were already communicated incommentaryunless the information changed, was corrected, or is necessary to state the final outcome.final.If you want this even stricter, add:
For small tasks,
finalshould usually be 1-3 sentences and should not repeat reasoning or progress already stated incommentary.Why This Fix Works
It creates a hard semantic split:
That removes the overlap instead of just asking the model to “be less repetitive.”
What Not To Do
Don’t put this in:
Those govern work in the repo. This issue is cross-task agent behavior, so the fix belongs in the agent’s developer-level
instruction set.
Recommended Final Form
If you want one single rule to install globally, use this:
commentaryis delta-only.finalis handoff-only. Never repeat commentary in final unless it changed or is required forthe final state.
If you want, I can turn this into a ready-to-paste diff against your current developer prompt text.
submitted feedback for this same thing 019d8330-af3d-7f21-86eb-49a61837a5da
https://github.com/openai/codex/issues/new?template=3-cli.yml&steps=Uploaded%20thread:%20019f421c-ed77-7d43-a7d0-e9146c3f5ce9
This is an example of duplication
<img width="1867" height="1026" alt="Image" src="https://github.com/user-attachments/assets/cc233fd4-2003-4290-b471-73c5c2aaa071" />