Codex CLI stream disconnects when running hatch-pet imagen workflow

Open 💬 1 comment Opened May 11, 2026 by Douglas-Strey

What version of Codex CLI is running?

codex-cli 0.130.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5-medium and gpt-5.5-low

What platform is your computer?

Darwin 25.4.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Ghostty

What issue are you seeing?

Codex CLI repeatedly disconnects during a hatch-pet workflow when it reaches the imagen/image generation step.

The CLI works normally for file inspection, manifest validation, and Python helper execution, but when the workflow tries to generate the base image using imagen, the stream disconnects before completion.

Error shown:

Falling back from WebSockets to HTTPS transport.
Stream disconnected before completion: An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists.

This reproduced multiple times.

What steps can reproduce the bug?

  1. Run Codex CLI in a hatch-pet project.
  2. Use an existing run directory:

/Users/douglasstrey/.codex/pet-runs/pikachu

  1. Ask Codex to inspect the hatch-pet run without generating images.
  2. Codex successfully validates the manifest and reports:
  • 10 total jobs
  • 0 completed
  • 1 ready: base
  • 9 blocked
  • blocked because decoded/base.png and references/canonical-base.png are missing
  1. Ask Codex to generate only the base image using imagen.
  2. The stream disconnects during the image generation step.

I also tested:

  • codex logout / codex login
  • brew update && brew upgrade --cask codex
  • gpt-5.5-medium
  • gpt-5.5-low
  • --full-auto
  • short prompts with minimal output
  • no VPN/proxy
  • ISP confirmed there are no routing/interruption issues

What is the expected behavior?

Codex CLI should complete the imagen/image generation step, save/register the generated base image, and continue without disconnecting the stream.

Additional information

Request IDs:

  • cb880c76-de63-4c68-a73c-6ad8472af0dc
  • 5f150610-a7ad-4b39-af1c-e09c57069db4
  • 09c99e6c-9b9a-47f1-9f01-68c8f9de0ad7
  • 9ee31f27-2999-42ab-82a2-c287a15023aa

The issue seems isolated to imagen/tool execution:

  • Inspecting files works
  • Reading manifest works
  • Running Python helper scripts works
  • Short responses work
  • The disconnect happens when Codex tries to generate the image

A manual workaround suggested by Codex was to generate the base image outside Codex and then register it manually with:

python3 /Users/douglasstrey/.codex/skills/hatch-pet/scripts/record_imagen_result.py \
--run-dir /Users/douglasstrey/.codex/pet-runs/pikachu \
--job-id base \
--source /ABS/PATH/TO/generated-base.png

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗