macOS app: stream disconnected before completion after image_generation_call events

Open 💬 3 comments Opened Apr 23, 2026 by iqqs33i-stack
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From "About Codex" dialog)?

Observed in local logs as 0.122.0-alpha.13

What subscription do you have?

ChatGPT sign-in

What platform is your computer?

macOS

What issue are you seeing?

Repeated:

stream disconnected before completion: An error occurred while processing your request...

This does not appear to be isolated to a single conversation.

For thread 019db9b2-baa2-7970-92f0-568f1d16d025, the thread itself later retried multiple times and failed around 2026-04-23 02:50-03:03 in America/Los_Angeles.

What steps can reproduce the bug?

In this case the thread was working normally, then the app received websocket events for an image_generation_call, after which the turn retried repeatedly and failed.

Relevant sanitized sequence from local logs:

2026-04-23 02:50:31 response.output_item.added item.type=image_generation_call status=in_progress
2026-04-23 02:50:31 failed to parse ResponseItem from output_item.added
2026-04-23 02:50:32 unhandled responses event: response.image_generation_call.in_progress
2026-04-23 02:50:38 unhandled responses event: response.image_generation_call.generating
2026-04-23 02:51:39 websocket error type=server_error request_id=7b68ddbe-13be-9caa-a7d5-5a71d25fdd82
2026-04-23 02:54:55 stream disconnected - retrying sampling request (1/5 in 216ms)
2026-04-23 02:56:05 stream disconnected - retrying sampling request (2/5 in 401ms)
2026-04-23 02:57:10 stream disconnected - retrying sampling request (3/5 in 768ms)
2026-04-23 03:00:17 stream disconnected - retrying sampling request (4/5 in 1.503s)
2026-04-23 03:03:26 stream disconnected - retrying sampling request (5/5 in 2.912s)

Request IDs involved:

  • upstream error pasted into the thread: 173cb339-4dc3-4c8b-8392-11614ebb67a2
  • later failure in the same thread: 7b68ddbe-13be-9caa-a7d5-5a71d25fdd82

Separate same-day failures from another thread:

  • 68b83d22-a510-414d-a424-41737234752d
  • 22a4bf92-3114-43be-b5bc-20b82a23f87c

What is the expected behavior?

The turn should either continue streaming normally or fail with a handled and clear error state, without repeated disconnect retries and unhandled image-generation events.

Additional information

Possibly related to #19107.

I have also added a follow-up comment with the corrected request ID and the same sanitized excerpt. If helpful, I can provide a larger sanitized excerpt from macOS app logs and ~/.codex/sessions.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #19107

Powered by Codex Action

iqqs33i-stack · 4 months ago

Adding a sanitized log excerpt and one correction:

The later request ID in this thread is 7b68ddbe-13be-9caa-a7d5-5a71d25fdd82.
My original issue body incorrectly listed a different ID.

Sanitized excerpt from local logs (America/Los_Angeles):

2026-04-23 02:50:31 response.output_item.added item.type=image_generation_call status=in_progress
2026-04-23 02:50:31 failed to parse ResponseItem from output_item.added
2026-04-23 02:50:32 unhandled responses event: response.image_generation_call.in_progress
2026-04-23 02:50:38 unhandled responses event: response.image_generation_call.generating
2026-04-23 02:51:39 websocket error type=server_error request_id=7b68ddbe-13be-9caa-a7d5-5a71d25fdd82
2026-04-23 02:54:55 stream disconnected - retrying sampling request (1/5 in 216ms)
2026-04-23 02:56:05 stream disconnected - retrying sampling request (2/5 in 401ms)
2026-04-23 02:57:10 stream disconnected - retrying sampling request (3/5 in 768ms)
2026-04-23 03:00:17 stream disconnected - retrying sampling request (4/5 in 1.503s)
2026-04-23 03:03:26 stream disconnected - retrying sampling request (5/5 in 2.912s)

Separate same-day failures from another thread:

2026-04-23 01:57:27 Turn error ... request ID 68b83d22-a510-414d-a424-41737234752d
2026-04-23 02:27:13 Turn error ... request ID 22a4bf92-3114-43be-b5bc-20b82a23f87c

If needed I can also provide the exact session transcript file path and a larger sanitized excerpt from ~/.codex/sessions and macOS app logs.

jojo1232123 · 4 months ago

Also reproduced this on macOS in Codex Desktop today.

Environment:

  • Codex CLI/App server reported by the app: 0.126.0-alpha.8
  • Platform: macOS 26.3.1, arm64
  • Feature flag shown in logs: image_generation enabled

Repro:

  1. In a normal Codex Desktop conversation, asked the assistant to run a very lightweight image generation smoke test.
  2. The app/session disconnected before an image result was returned.
  3. After reopening/resuming, the previous turn showed as failed.

Local sanitized log signals after the disconnect/resume:

2026-04-28T10:22:51.691Z maybe_resume_success conversationId=019dd382-0f0e-7593-9c0d-eaefef4a6382 latestTurnId=019dd394-282d-7651-9a64-27b060e020af latestTurnStatus=failed markedStreaming=true turnCount=9
2026-04-28T10:22:51.822Z Received turn/started for unknown conversation conversationId=019dd39c-f383-77b3-86a1-f784ed446d98
2026-04-28T10:22:54.190Z Received item/started for unknown conversation conversationId=019dd39c-f383-77b3-86a1-f784ed446d98
2026-04-28T10:22:56.763Z Conversation state not found conversationId=019dd39c-f383-77b3-86a1-f784ed446d98
2026-04-28T10:23:08.115Z Received item/completed for unknown conversation conversationId=019dd39c-f383-77b3-86a1-f784ed446d98

I did not attach any prompt/project data because the repro was intentionally a minimal image-generation smoke test. This looks related to the same class of failure: image-generation turn starts, the desktop stream/session drops, and after resume the app receives events for conversation state it no longer recognizes.