Skip to content

fix(codex): tolerate None output stream path and empty tools field - #33051

Closed
CH-Tony wants to merge 2 commits into
NousResearch:mainfrom
CH-Tony:fix/codex-responses-none-typeerror-output
Closed

fix(codex): tolerate None output stream path and empty tools field#33051
CH-Tony wants to merge 2 commits into
NousResearch:mainfrom
CH-Tony:fix/codex-responses-none-typeerror-output

Conversation

@CH-Tony

@CH-Tony CH-Tony commented May 27, 2026

Copy link
Copy Markdown

Summary

  • Handle TypeError: 'NoneType' object is not iterable from Codex streaming by recovering from collected stream events (response.output_item.done) and streamed text deltas.
  • Avoid sending tools: None in Responses kwargs when no tools are available (OpenAI python 2.24 workaround).
  • Add regression tests for both behaviors.

Testing

  • pytest -q tests/run_agent/test_run_agent_codex_responses.py
  • pytest -q tests/run_agent/test_provider_parity.py -k codex

@CH-Tony
CH-Tony requested a review from a team May 27, 2026 05:43
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have codex comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 27, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #32963 (merged) — same Codex response.output=null recovery in codex_runtime.py. The tools: None guard also overlaps #32911. Root cause: #11179. This PR also bundles unrelated changes (observability, web UI, pyproject.toml, config).

@CH-Tony

CH-Tony commented May 27, 2026

Copy link
Copy Markdown
Author

Duplicate of #32963 (merged, root-cause #11179) and overlaps #32911 (tools=None guard).

@CH-Tony CH-Tony 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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants