Skip to content

fix: handle Codex OAuth responses missing output - #32928

Closed
bamsby wants to merge 1 commit into
NousResearch:mainfrom
bamsby:fix/codex-oauth-missing-output
Closed

fix: handle Codex OAuth responses missing output#32928
bamsby wants to merge 1 commit into
NousResearch:mainfrom
bamsby:fix/codex-oauth-missing-output

Conversation

@bamsby

@bamsby bamsby commented May 27, 2026

Copy link
Copy Markdown

Summary

  • Coerce completed OpenAI Responses objects with missing/null output to an empty output list before SDK parsing raises a TypeError
  • Keep incomplete, failed, and already-populated responses untouched
  • Treat the observed SDK TypeError as a Codex stream completion failure so Hermes can use the existing retry/fallback path
  • Add regression coverage for the parser compatibility helper and streaming fallback

Security / secrets check

  • Scanned added lines and committed diff for hardcoded secret assignments and common API key/token patterns
  • No API keys, OAuth tokens, or secrets were found in the diff
  • The change does not log or transmit credentials; it only normalizes response object shape and uses existing fallback behavior

Test Plan

  • env -u PYTHONHOME -u PYTHONPATH PYTHONPATH="/c/Users/g_nan/AppData/Local/hermes/hermes-agent" ./venv/Scripts/python -m py_compile agent/codex_runtime.py tests/run_agent/test_run_agent_codex_responses.py
  • env -u PYTHONHOME -u PYTHONPATH PYTHONPATH="/c/Users/g_nan/AppData/Local/hermes/hermes-agent" ./venv/Scripts/python -m pytest -o addopts= tests/run_agent/test_run_agent_codex_responses.py -q -p no:timeout

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/openai OpenAI / Codex Responses API codex duplicate This issue or pull request already exists labels May 27, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #32884 — same Codex Responses null output recovery. Root cause tracked in #11179.

@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 duplicate This issue or pull request already exists 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