Skip to content

fix(codex): combine Responses timeout fixes - #31938

Closed
wysie wants to merge 1 commit into
NousResearch:mainfrom
wysie:fix/codex-responses-timeout-combined
Closed

fix(codex): combine Responses timeout fixes#31938
wysie wants to merge 1 commit into
NousResearch:mainfrom
wysie:fix/codex-responses-timeout-combined

Conversation

@wysie

@wysie wysie commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Backports and combines two Codex Responses timeout fixes onto current main:

This also resolves the current helper-based refactor conflict by applying the stale-timeout logic in agent/chat_completion_helpers.py, while keeping run_agent.py as a forwarder. It preserves xAI Responses extra_body preflight support while adding timeout to the allowlist.

Test plan

  • git diff --check
  • .venv/bin/python -m compileall -q run_agent.py agent/transports/codex.py agent/codex_responses_adapter.py agent/chat_completion_helpers.py
  • HERMES_HOME=/private/tmp/hermes-agent-test-home venv/bin/python -m pytest tests/agent/test_non_stream_stale_timeout.py tests/agent/transports/test_codex_transport.py tests/run_agent/test_run_agent_codex_responses.py tests/run_agent/test_run_agent.py::TestBuildApiKwargs -q -o addopts=

Result: 140 passed, 1 warning.

Backports PR NousResearch#24126 and PR NousResearch#31855 onto the current helper-based agent loop.

Preserves configured timeouts for Codex Responses requests, estimates non-stream stale timeouts from full Responses payloads, keeps xAI Responses extra_body preflight support, and adds regression coverage for the helper path.

Co-authored-by: Hoang V. Pham <26063003+hehehe0803@users.noreply.github.com>
@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/copilot GitHub Copilot (ACP + Chat) labels May 25, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks @wysie — closing this as redundant. The Responses-payload stale-timeout estimation + timeout propagation through the Codex transport/preflight landed on main earlier today via #29507's follow-up (commit 2d42272 by @kasunvinod), which covers the same two upstreams (#24126 and #31855) you backported here. Your work helped confirm the design direction.

The remaining gap — first-byte detection on the Codex stream itself — is being salvaged from #31984 in #32042. Appreciate you helping triage this.

@teknium1 teknium1 closed this May 25, 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 P3 Low — cosmetic, nice to have provider/copilot GitHub Copilot (ACP + Chat) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants