Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex CLI response.failedidle timeout waiting for SSE reproduction

Independent XBSTACK reproduction of OpenAI Codex CLI issue #43140.

What this reproduces

When an HTTP SSE server sends a terminal response.failed event and then keeps the socket open, Codex CLI can keep waiting for EOF until the configured stream idle timeout fires. The user-visible error then becomes idle timeout waiting for SSE, which hides the original server failure.

Independent results

Tested on macOS with a local loopback HTTP server. No model, OpenAI/Azure API, credential, or external network service is used by the reproducer.

Codex CLI Server behavior Original failure preserved Idle timeout reported
0.153.4 close after response.failed yes no
0.153.4 keep socket open no yes
0.154.0 close after response.failed yes no
0.154.0 keep socket open no yes

The fixture uses an 800 ms stream idle timeout so the failure can be observed quickly.

Run

python3 repro.py \
  --codex /Applications/ChatGPT.app/Contents/Resources/codex \
  --output logs/result-0.153.4.json

For another Codex executable:

python3 repro.py --codex /path/to/codex --output logs/result.json

Expected behavior

Once a valid terminal response.failed event is received, the client should report that failure immediately rather than waiting for the underlying SSE socket to close.

Observed behavior

If the fixture closes immediately after response.failed, Codex reports the original marker:

stream disconnected before completion: XBSTACK_LOCAL_TERMINAL_FAILURE

If the fixture leaves the connection open, Codex reports:

stream disconnected before completion: idle timeout waiting for SSE

and the original marker is no longer present in the user-visible error event.

Scope

This repository confirms a client-side failure-handling shape. It does not claim that every Codex/Azure reconnect, server_error, or timeout is caused by this defect. Real upstream capacity, network, provider, and model failures must be diagnosed separately.

Upstream

XBSTACK articles

About

Independent reproduction of Codex CLI response.failed being replaced by idle timeout waiting for SSE on 0.153.4 and 0.154.0.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages