codex - 💡(How to fix) Fix Unexpected tool-call leakage and unrelated gambling content in Codex App response [2 comments, 3 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#17775Fetched 2026-04-15 06:28:32
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Timeline (top)
labeled ×5commented ×2closed ×1

Root Cause

The session context was entirely about an English-learning/coding project, and I never asked Codex to open or search gambling/adult content. The unrelated content appeared together with leaked internal tool-call text in a normal response. This behavior is concerning because it introduces unrelated and potentially harmful content (e.g., gambling/adult text) into normal user workflows.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

0.118.0

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Win32NT 10.0.26200.0 Microsoft Windows NT 10.0.26200.0

What issue are you seeing?

While using Codex App for a normal coding / translation task, the assistant unexpectedly produced unrelated content mixed with internal tool invocation output.

The response included:

  • Gambling-related and irrelevant Chinese text
  • Unexpected tool call markers such as: to=functions.shell_command
  • Raw command JSON (e.g. Get-Content commands) leaking into the response

This content appeared in the middle of an otherwise normal response and was completely unrelated to the user task.

Expected behavior:

  • Only relevant assistant output should be shown
  • Tool invocation details should never be visible to the user

Actual behavior:

  • The response contained a mixture of normal output, unrelated spam-like text, and internal tool-call content

This may indicate tool output leakage or context contamination in the agent pipeline.

What steps can reproduce the bug?

Steps to reproduce:

  1. Open Codex App (Windows environment)
  2. Start a normal coding / translation task
  3. Continue interacting for several turns
  4. At some point, the assistant response includes:
    • unrelated gambling-like content (Chinese text)
    • tool call markers such as "to=functions.shell_command"
    • raw JSON command payload (e.g. Get-Content)

Notes:

  • This was not triggered intentionally by requesting shell commands
  • The content appears unexpectedly within a normal response
  • The issue may not occur immediately but appears during longer interactions
<img width="1224" height="1222" alt="Image" src="https://github.com/user-attachments/assets/62dc0446-da6b-48d5-bedd-4ec5686d09e3" /> The following Chinese phrases appeared in the response and are unrelated to the task:
  • "娱乐彩票平台" → entertainment betting platform (gambling-related)

  • "中国福利彩票" → China Welfare Lottery

  • "天天中彩票" → daily lottery winning (gambling-related)

  • "娱乐城招商" → casino platform promotion

These terms are clearly unrelated to the coding/translation task and are typically associated with gambling or spam content.

What is the expected behavior?

The assistant should only output content relevant to the user’s request.

Internal tool invocation details (e.g. to=functions.shell_command or raw command JSON) should never be visible in the user-facing response.

The output should remain clean, stable, and free of unrelated or spam-like content.

Additional information

The session context was entirely about an English-learning/coding project, and I never asked Codex to open or search gambling/adult content. The unrelated content appeared together with leaked internal tool-call text in a normal response. This behavior is concerning because it introduces unrelated and potentially harmful content (e.g., gambling/adult text) into normal user workflows.

Such output may affect user trust and is not appropriate in the context of an English-learning or coding task.

extent analysis

TL;DR

The issue can be mitigated by reporting the problem to the Codex App developers, as it appears to be a tool output leakage or context contamination in the agent pipeline.

Guidance

  • Verify that the issue is not specific to the user's account or environment by testing with a different account or on a different machine.
  • Check if the issue persists across different tasks and coding/translation projects to determine if it's task-specific or a broader problem.
  • Consider providing more details about the specific coding/translation task and the turns leading up to the unexpected output to help the developers identify the root cause.
  • Report the issue to the Codex App developers, including the version number (0.118.0) and the subscription type (ChatGPT Pro), to facilitate investigation and potential fixes.

Notes

The exact cause of the issue is unclear, but it appears to be related to the internal tool invocation and output handling within the Codex App. The presence of unrelated Chinese text and internal tool-call markers suggests a potential contamination or leakage of internal tool output.

Recommendation

Apply workaround: Report the issue to the Codex App developers and await their response, as this appears to be a bug that requires a fix from the development team.

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