Skip to content

Fix Codex Responses crash when output is null - #32898

Closed
TriMinhPham wants to merge 1 commit into
NousResearch:mainfrom
TriMinhPham:fix/codex-responses-output-null
Closed

Fix Codex Responses crash when output is null#32898
TriMinhPham wants to merge 1 commit into
NousResearch:mainfrom
TriMinhPham:fix/codex-responses-output-null

Conversation

@TriMinhPham

Copy link
Copy Markdown

Summary

  • detect the OpenAI SDK Responses stream parser crash caused by response.output = null
  • recover from streamed Codex output items or text deltas when available
  • normalize remaining output = null cases into the existing malformed-response retry/fallback path
  • guard response.output_text access because the SDK property can raise the same TypeError when output is null

Tests

  • venv/bin/python -m pytest tests/run_agent/test_run_agent_codex_responses.py
  • venv/bin/python -m pytest tests/agent/transports/test_codex_transport.py
  • venv/bin/python -m py_compile agent/codex_runtime.py agent/codex_responses_adapter.py agent/conversation_loop.py

@teknium1

Copy link
Copy Markdown
Contributor

Closing as duplicate — the Codex null-output fix has been merged via #32963 (cherry-picked from @carltonawong's PR #32890). Thanks for the help during the outage. Closes #11179.

@teknium1 teknium1 closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have 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.

3 participants