Duplicate instruction blocks in final assembled base instructions

Resolved 💬 2 comments Opened Mar 12, 2026 by styx-000 Closed Mar 30, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.114.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.4

What platform is your computer?

Darwin 25.2.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iTerm2

What issue are you seeing?

The rollout JSONL contains duplicated instruction blocks inside session_meta.payload.base_instructions.text.

I can identify two concrete duplicate cases inside the assembled instruction text itself:

1. Exact duplicate

The following instruction appears twice verbatim:

"Never use nested bullets. Keep lists flat (single level). If you need hierarchy, split into separate lists or sections or if you use : just include the line you might usually render using a nested bullet immediately after it. For numbered lists, only use the 1. 2. 3. style markers (with a period), never 1)."

Positions in the assembled text:

  • first occurrence under ## Formatting rules
  • second occurrence under Requirements for your final answer

2. Near-verbatim duplicate

The following instruction appears twice with the same opening sentence and almost identical wording:

"Do not begin responses with conversational interjections or meta commentary. Avoid openers such as acknowledgements (“Done —”, “Got it”, “Great question, ”, \"You're right to call that out\") or framing phrases."

Positions in the assembled text:

  • first occurrence under Requirements for your final answer
  • second occurrence under ## Intermediary updates

In the second case, the two occurrences differ only in the trailing example list, but the instruction itself is effectively duplicated. These sections describe different stages of the agent output (final answers vs. intermediary updates), so the duplication may be reasonable in context.

What steps can reproduce the bug?

  1. Start Codex CLI in a repo.
  2. Start a new session by sending an initial prompt.
  3. Open the generated rollout JSONL for that session.
  4. Inspect the first session_meta entry.
  5. Look at payload.base_instructions.text.
  6. Search within payload.base_instructions.text for the following phrases:
  • Never use nested bullets
  • Do not begin responses with conversational interjections or meta commentary
  1. Observe that:
  • the Never use nested bullets... instruction appears twice verbatim
  • the Do not begin responses with conversational interjections or meta commentary... instruction appears twice with only minor wording differences

What is the expected behavior?

The final assembled base instructions should not contain exact duplicate instruction blocks.

If multiple instruction sources are intentionally merged, exact duplicates and near-verbatim duplicates should ideally be deduplicated before the final assembled instruction text is written.

Additional information

_No response_

View original on GitHub ↗

2 Comments

etraut-openai contributor · 5 months ago

Are you seeing a behavioral problem, or are you just asking why the JSONL file might contain duplicate blocks? I don't think this is necessarily unexpected.

If you'd like me to look at it, please use the /feedback command to upload the session and past the thread ID below.

styx-000 · 5 months ago

Thanks for the clarification.

I’m not seeing any behavioral problem here. That said, since this base instruction appears at the start of every session, the presence of exact duplicate blocks seems a bit unusual to me from a maintainability perspective and may also result in some token overhead, which could add up at scale, so I was wondering whether this part might benefit from being more standardized.

Here is the thread ID if you'd like to take a look: 019cdf6d-3b55-7cd2-9e33-61d500b6fa6c