Fix post-terminal stream close race in Codex

NousResearch/hermes-agent · cluster 127390

Data as of

Nothing open on GitHub. Fix merged in #130555. Check it covers your case.

The short answer

0open issues
0open PRs
6items grouped
Known?
Yes. 6 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #130555. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #130555. That is separate from the fix event.
Still open
Nothing open on GitHub.

These items address a concurrency bug in Codex where closing a stream from the owner thread while a drain thread is still reading it causes file-descriptor recycling corruption. The fix transfers stream-close ownership to the drain thread and limits the owner thread to a socket shutdown.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #130555 Codex Responses: a slow post-reply stream drain no longer risks corrupting other open files (#127390, salvage #127615)

    merged to main

    files: agent/agent_runtime_helpers.py, agent/chat_completion_helpers.py, agent/codex_runtime.py, tests/agent/test_run_agent_codex_responses.py

4 PRs closed without merging

From the close comments: superseded by another PR 3 · merged via another change 1

  • #127391 fix(codex): the post-terminal drain thread owns the stream close; the owner thread only shuts the socket down (#127390) · superseded by another PR → #130555, #127390
  • #127503 fix(P1): fix(codex): post-terminal drain thread owns the stream close · superseded by another PR → #127615, #127390, #130555
  • #127504 fix(P1): Bug: Codex Responses post-terminal drain fd-recycle corruption · superseded by another PR → #127615, #127390, #130555
  • #127615 fix(codex): keep post-terminal cleanup on the reader thread · merged via another change → cdb8fd3, #130555
Closed issues · 1
  • Closed#127390Codex Responses post-terminal drain: closing the stream from the owner thread while the drain thread reads it releases the fd under the reader's SSL BIO (fd-recycle corruption, same class as #29507)
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.33: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#130555
Closed issues
1
Attempts
4 PRs closed without merging
Fix link checked
3 Oct 2026

For your agent

The same facts, typed.