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_

View original on GitHub ↗

12 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14513
  • #13823

Powered by Codex Action

etraut-openai contributor · 4 months ago

If you're able to repro this, please use /feedback to upload the session details, then post the thread ID here.

hellectronic · 4 months ago

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?"

thetinygoat · 4 months ago

I'll try to repro this and share the thread id

hellectronic · 4 months ago
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?"

thread ID 019d0b82-cf62-74a1-b1ba-07df92b345a6

sangoi-exe contributor · 4 months ago

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.

thetinygoat · 3 months ago
If you're able to repro this, please use /feedback to upload the session details, then post the thread ID here.

019d2436-feb8-7b71-8b9a-435856700589

thetinygoat · 3 months ago
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.

No im using the default configuration.
Here's my config.toml

model = "gpt-5.4"
model_reasoning_effort = "high"
personality = "friendly"

[features]
rmcp_client = true
steer = true
ziyunli · 3 months ago

Also ran into this issue, 019d6e2c-748e-72d1-921e-2efb936060b2

sr198 · 3 months ago

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:

  • commentary is required to be frequent and informative, including what I’m doing and what I’ve learned.
  • final is required to explain outcomes and changes clearly.

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:

  • the instructions strongly encourage status updates every ~30s
  • but there is no equally strong negative rule saying “do not repeat commentary content in final unless it changed”

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:

  • commentary currently means both progress and mini-summary
  • final currently means both final state and recap

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:

  • the developer instructions section that defines Intermediary updates
  • and reinforce it in Final answer instructions

Patch To Apply

Add this to the developer prompt under Intermediary updates:

Channel separation rule:

  • commentary is for incremental progress only.
  • Do not restate completed results in commentary if they will appear in final.
  • Do not use commentary to summarize the whole task, recap prior progress, or preview the final answer.
  • Each commentary update should contain only net-new information: current action, newly discovered constraint, or

immediate next step.

Add this to Final answer instructions:

No-repetition rule:

  • final must not recap process updates that were already communicated in commentary unless the information changed, was corrected, or is necessary to state the final outcome.
  • Prefer reporting only:
  1. the end state,
  2. the files or artifacts changed,
  3. any remaining risk, blocker, or next step.
  • Do not include a progress narrative in final.

If you want this even stricter, add:

For small tasks, final should usually be 1-3 sentences and should not repeat reasoning or progress already stated in
commentary.

Why This Fix Works

It creates a hard semantic split:

  • commentary = transient delta
  • final = durable handoff

That removes the overlap instead of just asking the model to “be less repetitive.”

What Not To Do

Don’t put this in:

  • AGENTS.md
  • product constitutions
  • repo architecture docs

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:

commentary is delta-only. final is handoff-only. Never repeat commentary in final unless it changed or is required for
the final state.

If you want, I can turn this into a ready-to-paste diff against your current developer prompt text.

alecramos-sudo · 3 months ago

submitted feedback for this same thing 019d8330-af3d-7f21-86eb-49a61837a5da

iskandersierra · 12 days ago

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" />