codex - ✅(Solved) Fix Bug: realtime backend prompt contains leaked authoring instructions [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17645Fetched 2026-04-14 05:41:50
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×3closed ×1mentioned ×1subscribed ×1

PR fix notes

PR #17493: fix

Description (problem / solution / changelog)

External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed: https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.

Changed files

  • codex-rs/core/src/realtime_prompt.rs (modified, +1/-1)
  • codex-rs/core/templates/realtime/backend_prompt.md (modified, +22/-8)
RAW_BUFFERClick to expand / collapse

What issue are you seeing?

After https://github.com/openai/codex/pull/17493 by @aibrahim-oai codex-rs/core/templates/realtime/backend_prompt.md currently appears to contain prompt-authoring/editing instructions that were committed into the final runtime prompt instead of being resolved into clean model-facing guidance.

Examples from the current file:

  • Delete every rule that sounds corporate.
  • `Add a rule: 'Never open with Great question...'
  • Add this line verbatim at the end of the vibe section...
  • Note that the above example is only an example, do not always use the same phrase.

These read like drafting notes or rewrite instructions rather than stable final prompt content.

Relevant file and commit:

  • codex-rs/core/templates/realtime/backend_prompt.md
  • 163ae7d3e6578c69afcf4ba80353bc76c86a683b

What steps can reproduce the bug?

  1. Use the default realtime backend prompt path (i.e. do not override experimental_realtime_ws_backend_prompt).
  2. Inspect codex-rs/core/templates/realtime/backend_prompt.md in the current tree, or let the realtime flow use it via prepare_realtime_backend_prompt(...).
  3. Observe that the prompt includes authoring/editing instructions instead of only final model-facing instructions.

What is the expected behavior?

The realtime backend prompt should contain only the final intended instructions for the model.

Authoring artifacts like:

  • rewrite instructions
  • "add a rule" directives
  • "add this line verbatim" notes
  • meta-comments about examples/repetition

should be resolved before the prompt is committed and used at runtime.

Additional information

This is prompt hygiene rather than a feature request, and should have been caught during PR review.

The prompt is used by the experimental realtime backend flow here:

  • codex-rs/core/src/realtime_prompt.rs
  • codex-rs/core/src/realtime_conversation.rs

So this is model-facing runtime content, not just an internal drafting document.

extent analysis

TL;DR

Remove or resolve authoring/editing instructions from the backend_prompt.md file to ensure only final model-facing instructions are included.

Guidance

  • Review the codex-rs/core/templates/realtime/backend_prompt.md file and remove any lines that appear to be authoring or editing instructions, such as "Delete every rule that sounds corporate" or "Add a rule: 'Never open with Great question...'".
  • Verify that the updated prompt only includes final intended instructions for the model by inspecting the file manually or using the prepare_realtime_backend_prompt function.
  • Check the codex-rs/core/src/realtime_prompt.rs and codex-rs/core/src/realtime_conversation.rs files to ensure that the updated prompt is being used correctly in the experimental realtime backend flow.
  • Consider adding a review step to the PR process to catch similar issues in the future.

Example

No code snippet is provided as it is not necessary for this issue, but an example of a cleaned-up backend_prompt.md file might include only the final model-facing instructions, without any authoring or editing notes.

Notes

This issue appears to be a one-time mistake that can be resolved by manually cleaning up the backend_prompt.md file. However, it may be worth reviewing other prompt files to ensure that they do not contain similar authoring or editing instructions.

Recommendation

Apply workaround: manually remove or resolve authoring/editing instructions from the backend_prompt.md file, as this is a one-time fix that can be applied immediately to resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING