Skip to content

fix(codex): suppress commentary phase leakage - #26898

Draft
yolopsx wants to merge 2 commits into
NousResearch:mainfrom
yolopsx:fix/codex-commentary-leak-suppression
Draft

fix(codex): suppress commentary phase leakage#26898
yolopsx wants to merge 2 commits into
NousResearch:mainfrom
yolopsx:fix/codex-commentary-leak-suppression

Conversation

@yolopsx

@yolopsx yolopsx commented May 16, 2026

Copy link
Copy Markdown

Summary

  • Suppress Codex Responses commentary / analysis phase text from visible assistant content.
  • Preserve Codex message items internally for replay/state continuity.
  • Update streaming expectations so raw output_text.delta is cached, not emitted to platform callbacks before phase-aware normalization.

Why

commentary and analysis can contain internal planning. They should not appear in Telegram/CLI/UI output unless a final-answer phase is present.

Test Plan

  • venv/bin/python -m pytest tests/run_agent/test_run_agent_codex_responses.py tests/run_agent/test_streaming.py::TestCodexStreamCallbacks -q
  • Result: 67 passed in 18.80s

Notes

Opened as draft because this is a visibility/privacy hardening change and maintainers may want to review provider replay semantics carefully.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/openai OpenAI / Codex Responses API labels May 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Possible duplicate of open #25268 and #21568, both targeting the same codex commentary phase leakage (issue #24933). Reviewers: please compare approaches and consolidate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants