Skip to content

fix(codex): keep commentary out of visible content - #21568

Closed
callexcapital wants to merge 1 commit into
NousResearch:mainfrom
callexcapital:fix/codex-commentary-leak-visible-content
Closed

fix(codex): keep commentary out of visible content#21568
callexcapital wants to merge 1 commit into
NousResearch:mainfrom
callexcapital:fix/codex-commentary-leak-visible-content

Conversation

@callexcapital

Copy link
Copy Markdown

Summary

  • do not promote Codex Responses phase=commentary/analysis message text into assistant.content
  • preserve commentary/analysis message items only as Codex replay/debug metadata while still executing structured tool calls
  • sanitize interim assistant commentary before gateway/UI callbacks
  • add regression coverage for the Discord-visible Need inspect... commentary leak with a real tool call

Related

Test plan

  • pytest tests/run_agent/test_run_agent_codex_responses.py -q -o 'addopts=' → 60 passed
  • pytest tests/run_agent/test_deepseek_reasoning_content_echo.py tests/gateway/test_session_boundary_security_state.py -q -o 'addopts=' → 41 passed

@teknium1

teknium1 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

The Codex commentary-phase leak this PR targeted is now fixed on main via PR #58868, which salvaged #58696 (broadest coverage: adapter + streaming + fallback) combined with #41343's reasoning-channel routing. Commentary/analysis-phase text now displays like thinking instead of leaking as visible content, in both normalized responses and live stream deltas.

You were the earliest submitter in this cluster — thank you for identifying and fixing the leak first. Closing since the fix that landed takes a different mechanism (phase-based routing at the adapter/runtime layer rather than callback sanitization).

@teknium1 teknium1 closed this Jul 5, 2026
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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants